You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-sizing-3][css-sizing-4] Move fit-content keyword to Level 3 and fit-content() function to Level 4 #10601
Back in 2017, it was resolved to defer the fit-content keyword level 4 of the Sizing spec. together with the stretch keyword.
Though it looks like in the meantime all major browser engines implemented this keyword already. Interestingly, they don't support the stretch keyword yet while the spec. refers to fit-content being equivalent to fit-content(stretch) (which is actually not allowed at the moment, because fit-content() currently only takes a <length-percentage>).
At the same time, the fit-content() function is not supported by any browser so far. There's only an experimental implementation in Firefox.
So, fit-content doesn't seem to be dependent on fit-content().
Therefore, I suggest to revert the resolution of #1912 and move the fit-content keyword back to level 3, and instead defer the fit-content() function to level 4.
The grammar of flex-basis is content | <‘width’>, so it's already covered. Listing flex-basis there would add a duplicate which I think is bad for webref
The CSSWG will automatically accept these resolutions one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support these resolutions, please add a new comment.
Proposed Resolutions:
Move the fit-content and stretch keywords from CSS Sizing 4 to level 3
Move the fit-content() function from CSS Sizing 3 to level 4.
Remove the reference to fit-content(stretch) from the definition of the fit-content keyword
Reacted by davidsgrogan, Yisi, L. David Baron and fantasai
RESOLVED: Move the fit-content and stretch keywords from CSS Sizing 4 to level 3
RESOLVED: Move the fit-content() function from CSS Sizing 3 to level 4.
RESOLVED: Remove the reference to fit-content(stretch) from the definition of the fit-content keyword
Activity
yisibl commentedon Nov 5, 2024
I would suggest migrating the
stretchkeyword back to Level 3 as well.-webkit-fill-availablewith the prefix-webkit-fill-available.-moz-available.cc @davidsgrogan
yisibl commentedon Oct 11, 2025
Additionally, the definition of
css-sizing-4is missing theflex-basisproperty.https://drafts.csswg.org/css-sizing-4/#sizing-values
Loirooriol commentedon Oct 11, 2025
The grammar of
flex-basisiscontent | <‘width’>, so it's already covered. Listingflex-basisthere would add a duplicate which I think is bad for webrefSebastianZ commentedon Oct 11, 2025
I believe, this change is relatively uncontroversial. So maybe we can resolve on that asynchronously.
The proposal is: Move the
fit-contentandstretchkeywords from CSS Sizing 4 to level 3 and thefit-content()function from level 3 to 4.Also, the reference to
fit-content(stretch)needs to be removed from the definition of thefit-contentkeyword.Sebastian
astearns commentedon Oct 13, 2025
I’m not sure I agree with moving
stretchback, if there are no implementations of the keyword as-is yet.Loirooriol commentedon Oct 13, 2025
@astearns Blink and Servo have shipped
stretch. And Gecko has started implementing it behind a pref, planning to enable it by the end of the year.https://chromestatus.com/feature/6176445286842368
https://groups.google.com/a/mozilla.org/g/dev-platform/c/JCUC9RJ74M8/m/6j0tFafoBAAJ
astearns commentedon Oct 20, 2025
The CSSWG will automatically accept these resolutions one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support these resolutions, please add a new comment.
Proposed Resolutions:
fit-contentandstretchkeywords from CSS Sizing 4 to level 3fit-content()function from CSS Sizing 3 to level 4.fit-content(stretch)from the definition of the fit-content keywordastearns commentedon Oct 27, 2025
RESOLVED: Move the fit-content and stretch keywords from CSS Sizing 4 to level 3
RESOLVED: Move the fit-content() function from CSS Sizing 3 to level 4.
RESOLVED: Remove the reference to fit-content(stretch) from the definition of the fit-content keyword
[css-sizing-3][css-sizing-4] Swap levels of stretch, fit-content, and…
yisibl commentedon Sep 1, 2026
It looks like this issue can be closed. b1ebca4