Skip to content

[css-flexbox] flex-shrink: hide #4199

@Wes1262

Description

@Wes1262

Rather than shrinking the element, CSS would just hide it.

For example a <button> normally containing a label and a icon, might hide the label if the <button> gets too small.

<button>
    <img src="icon.png" alt="">
    <span>Label</span>
</button>
button { display: flex; flex-direction: row; }
button > img { flex: 0 0 auto; }
button > span { flex: 1 hide auto; }

I'm not sure how this should work and must be discussed if you are interested. Maybe it should be another property that would intervene only after no further shrinking is possible (i.e. min-width/min-height constraint).

Thank you.

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