[css-flexbox] flex-shrink: hide

Open
#4,199 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
css
Domain
frontend

Research direction

Start with the issue's CSS Flexbox example and the question of how flex-shrink should interact with minimum-size constraints. Done means the Working Group has agreed on the behavior and the issue has been resolved in the relevant specification text.

Written by the indexing model from the issue text.

Description

css-flexbox-2 css-overflow-4

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.

Dominant language
Bikeshed
Stars
4.9k
Forks
816
Avg merge
2d 18h
Merged PRs (30d)
24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/csswg-drafts

All issues in w3c/csswg-drafts

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.