Skip to content

[css-flexbox][css-grid] orphan text nodes selector #4215

@Wes1262

Description

@Wes1262
div {
    display: flex;
}

div > *, div::orphan-text {
    display: block; flex: 1 1 auto; border: 2px red solid; padding: 10px;
}
<div>
    <span>flex item 1</span>
    orphan text, also a flex item, surrounded by a red border
    <span>flex item 2</span>
    another orphan text, also surrounded by a red border
</div>

Currently there's no way to change the appearance of "orphan" text nodes that are converted to flex or grid items.

With this addition "orphan" text nodes would become stylable as they were wrapped in an element.

Thank you. Hope that makes sense.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions