Add a pref to (temporarily) prevent `-webkit-fill-available` from being parsed in `{min,max}-{height,width}` (while still letting it be parsed in width & height)
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox145 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
In my work on the (currently-preffed-off) -webkit-fill-available towards the end of last year, we got it fully working for height, but it never got switched on because there are still some issues to sort out to get it working properly for min-height and max-height; that's why the keyword is still disabled.
I recall those {min,max}-{width,height} issues requiring a ~medium-size amount of work to sort out. I intend to pick that up again ~now and hope to complete it fairly soon -- but also, as an even-shorter-term route to mitigating most of the compat pain here, it looks like it'd be fairly straightforward to ship our existing support for -webkit-fill-available only as a keyword for width and height, excluding the min/max properties. I think that'd be worth doing as an ~easy mitigation, since most of the compat pain we see for this keyword is from its use in height in particular[1]. And then after we've done that, we can ship support for the keyword in {min,max}-{width,height}.
(As far as I've seen, sites tend to just use this keyword in one property -- nearly always height -- and don't do fancy things like expecting support in one property implies support in another property.)
Doing this will require some temporary shims in our CSS parsing code (to add an additional pref-check for usages of this keyword in {min,max}-{width,height} in a branch of the parsing code specifically for those properties), but at first glance it looks like it's doable and not too gross.
[1] From a quick look through the bugs tracked on our -webkit-fill-available bustage bugs, it looks like these ones all use it on height: bug 1944727, bug 1918019, bug 1911579, bug 1896571, bug 1886566, bug 1978907, bug 1949113. (Also bug 1971690 though in that case the site is now gone.) Those account for most of the bugs (and most of the site-popularity-based score) of the bustage there.
| Assignee | ||
Comment 1•11 months ago
•
|
||
To do this, I intent to add an additional about:config pref (maybe layout.css.webkit-fill-available.min-max-properties.enabled).
The intent will be that the existing pref, layout.css.webkit-fill-available.enabled, will remain the top-level pref to control whether we parse the value at all, and layout.css.webkit-fill-available.min-max-properties.enabled is an additional control for whether we'll even attempt to parse it for {min,max}-{width,height}.
Then, we'll be able to toggle the existing layout.css.webkit-fill-available.enabled to true and let that ride the trains to get things working for width and height; and then when we're confident that the {min,max}-{width,height} implementation is robust, we can also enable layout.css.webkit-fill-available.min-max-properties.enabled to get this shipping for those properties as well.
| Assignee | ||
Updated•11 months ago
|
| Assignee | ||
Comment 2•11 months ago
|
||
(reframing the bug summary to be about adding the new pref to add differential behavior between these properties. I'll file a separate bug to cover enabling the main pref while leaving this new pref off.)
| Assignee | ||
Comment 3•11 months ago
|
||
Backed out for causing reftest failures @grid-item-auto-min-size-clamp-007.html.
| Assignee | ||
Comment 5•11 months ago
|
||
Thanks - sorry about that, I'll take a look.
That was almost certainly from the other patch in this stack, so I've retriggered lando for just this one (which on its own should not impact behavior).
Comment 8•11 months ago
|
||
| bugherder | ||
Description
•