RESOLVED FIXED Bug 229438
Incorrect specificity with ::slotted
https://bugs.webkit.org/show_bug.cgi?id=229438
Summary Incorrect specificity with ::slotted
Jeroen Zwartepoorte
Reported 2021-08-24 00:23:42 PDT
https://codepen.io/jpzwarte/pen/oNwNdpN?editors=0110 In Chromium and Firefox, the background is hotpink. In Safari and STP, the background is green. This is the CSS for the web component: ```css :host([foo]) ::slotted(h1) { --background: hotpink; } ::slotted(h1) { --background: green; } ```
Attachments
Patch (3.08 KB, patch)
2021-08-25 05:11 PDT, Emilio Cobos Álvarez (:emilio)
no flags
Patch for landing (7.13 KB, patch)
2021-08-27 05:47 PDT, Emilio Cobos Álvarez (:emilio)
no flags
Jeroen Zwartepoorte
Comment 1 2021-08-24 00:25:52 PDT
Workaround is to switch the rules. (hotpink last)
Emilio Cobos Álvarez (:emilio)
Comment 2 2021-08-25 05:11:43 PDT
Emilio Cobos Álvarez (:emilio)
Comment 3 2021-08-25 05:12:31 PDT
Gah, Ryosuke, you nerd-sniped me :) Hoping there's something in WPT for this, if not not sure I'll have the cycles to finish this soon, I'm taking a long weekend off computers :)
Emilio Cobos Álvarez (:emilio)
Comment 4 2021-08-25 08:50:43 PDT
Antti Koivisto
Comment 5 2021-08-26 03:45:44 PDT
Maybe import the WPT before landing
Emilio Cobos Álvarez (:emilio)
Comment 6 2021-08-27 05:47:47 PDT
Created attachment 436619 [details] Patch for landing
EWS
Comment 7 2021-08-27 06:21:36 PDT
Committed r281692 (241042@main): <https://commits.webkit.org/241042@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 436619 [details].
Radar WebKit Bug Importer
Comment 8 2021-08-27 06:22:19 PDT
Ryosuke Niwa
Comment 9 2021-08-28 15:08:12 PDT
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3) > Gah, Ryosuke, you nerd-sniped me :) > > Hoping there's something in WPT for this, if not not sure I'll have the > cycles to finish this soon, I'm taking a long weekend off computers :) Thanks for the fix!
Note You need to log in before you can comment on or make changes to this bug.