WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
280307
Regression in Safari 18: all: revert-layer breaks due to style changes on parent elements
https://bugs.webkit.org/show_bug.cgi?id=280307
Summary
Regression in Safari 18: all: revert-layer breaks due to style changes on par...
Devon Govett
Reported
2024-09-24 17:27:46 PDT
This is a very strange bug that started occurring in Safari 18 on both macOS and iOS. It appears to be related to cascade layers. See the reproduction here:
https://codepen.io/devongovett/pen/gOJOVGo
Hovering over the outer element causes the color of the text to change, and unexpectedly, the width of the inner element collapses to zero. This appears to be due to the `all: revert-layer` rule applied to the inner element, which should simply revert to the previous cascade layer. The width should not be affected by the color change on the parent element. This resulted in regressions to Adobe's component library, which relies on cascade layers. revert-layer is used to ensure external styles outside a layer do not apply. This worked correctly in previous versions of Safari, and works fine in Chrome and Firefox as well.
Attachments
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2024-09-25 16:45:19 PDT
@Devon - it seems that Safari Technology Preview 203 already matches with Chrome Canary 131 and Firefox Nightly 132 and does not collapse like Safari 18.1 Beta do. Can you test this as well on your end?
Devon Govett
Comment 2
2024-09-25 21:13:12 PDT
Thanks! Yes, I can verify that it is broken in both 18.0 (20619.1.26.31.6) and 18.1 in macOS 15.1 Developer Beta 5 (20619.2.3.1), but works in Safari Tech Preview 203 (20620.1.6). Any idea how much farther ahead tech preview is than 18.1? Any chance whatever fixed this could make it into the shipping version?
Alexey Proskuryakov
Comment 3
2024-09-30 10:15:48 PDT
STP is not necessarily ahead of these Safari builds. This is an important data point, but it does not prove in itself that the issue is already fixed.
Radar WebKit Bug Importer
Comment 4
2024-09-30 10:16:00 PDT
<
rdar://problem/136976934
>
Simon Fraser (smfr)
Comment 5
2024-10-09 13:45:27 PDT
Could you convert
https://codepen.io/devongovett/pen/gOJOVGo
into a self-describing test? We can't tell if this is fixed.
Devon Govett
Comment 6
2024-10-09 13:52:50 PDT
Sure, I updated it to have more description. Let me know if you're still not sure.
Simon Fraser (smfr)
Comment 7
2024-10-09 14:22:37 PDT
The test passes in Safari Tech Preview 203, so I think this is fixed.
Devon Govett
Comment 8
2024-12-02 14:16:59 PST
Looks like this reproduction is fixed in Safari 18.2 beta, but there is still another broken case. I reported that as a separate issue here:
https://bugs.webkit.org/show_bug.cgi?id=283942
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug