Bug 241433
| Summary: | Make CSS custom properties that are invalid at computed value time guaranteed-invalid | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Shaw Jia <xiaozj> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | augus.dupin, bramus, james0x57, justin_michaud, koivisto, ntim, philip, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | Safari 15 | ||
| Hardware: | All | ||
| OS: | All | ||
Shaw Jia
Same as this Firefox bug: https://phabricator.services.mozilla.com/D116460
Also codepen demo: https://codepen.io/Miragecraft/pen/XWaLxNb
In short, when assigning an invalid CSS custom property to another custom property, it makes the final value unset (which means "inherit" for custom properties) instead of initial.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Bruno Stasse
WebKit's behaviour now differs from both Gecko's and Blink's, causing an interoperability issue.
Radar WebKit Bug Importer
<rdar://problem/95234259>
Philip Jägenstedt
Here's the relevant spec change:
https://github.com/w3c/csswg-drafts/issues/5370
https://github.com/w3c/csswg-drafts/pull/6006
And Safari-only failures in WPT:
https://wpt.fyi/results/css/css-variables/variables-substitute-guaranteed-invalid.html?run_id=6317090990981120&run_id=5097315145089024&run_id=5104235344035840&run_id=5084375415259136
The reason I noticed is because this issue was specifically called out in a freeform text comment from State of CSS 2022.
Antti Koivisto
Is now working.
Antti Koivisto
That is css/css-variables/variables-substitute-guaranteed-invalid.html WPT is passing.