Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to prototype: fit-content() function

68 views
Skip to first unread message

Boris Chiou

unread,
Mar 8, 2021, 6:17:06 PM3/8/21
to dev-platform
Hi,

[css-sizing-3] introduces a fit-content(<length-percentage>) value, that is
a new value similar to fit-content, except taking an argument instead of
using the available width. This value is used in width/min-width/max-width
(if the inline axis is horizontal). Gecko supports the -moz-fit-content
keyword, but before un-prefixing it, I think we should support
fit-content() first. The spec should be stable enough and the related spec
issue has been resolved (https://github.com/w3c/csswg-drafts/issues/3731).

Note: this is different from the fit-content() in grid layout.


*Bug*: https://bugzilla.mozilla.org/show_bug.cgi?id=1312588

*DevTools bug: Not open yet.*

*Standard*:
https://drafts.csswg.org/css-sizing-3/#valdef-width-fit-content-length-percentage

*Platform coverage*: All.

*Preference*: layout.css.fit-content-func.enabled

*Other browsers*: No other browsers support this now.

*web-platform-tests*: There are some wpts related to parsing fit-content()
already, but we still have to add more reftests for fit-content(). All wpts
should be in:
https://github.com/web-platform-tests/wpt/tree/master/css/css-sizing/
<https://github.com/web-platform-tests/wpt>
<https://github.com/web-platform-tests/wpt/tree/master/css>
<https://github.com/web-platform-tests/wpt/tree/master/css/css-sizing>
0 new messages