RESOLVED FIXED 222733
The :host() function pseudo-class should only accept a single compound-selector
https://bugs.webkit.org/show_bug.cgi?id=222733
Summary The :host() function pseudo-class should only accept a single compound-selector
Anders Hartvoll Ruud
Reported 2021-03-04 05:04:55 PST
It appears that Webkit currently accepts a <compound-selector-list> parse-time (but then it doesn't fully work at selector-matching-time)? In any case, the correct grammar is now: :host( <compound-selector> ) https://drafts.csswg.org/css-scoping/#selectordef-host Test: <!DOCTYPE html> <template id=template> <style> :host(#host1) slot { color: green; } :host(#host2, #host3) slot { color: green; } </style> <slot></slot> </template> <div id=host1><span>Should be green</span></div> <div id=host2><span>Should not be green</span></div> <div id=host3><span>Should not be green</span></div> <script> host1.attachShadow({mode:'open'}).append(template.content.cloneNode(true)); host2.attachShadow({mode:'open'}).append(template.content.cloneNode(true)); host3.attachShadow({mode:'open'}).append(template.content.cloneNode(true)); </script>
Attachments
Radar WebKit Bug Importer
Comment 1 2021-03-11 05:05:15 PST
Ryosuke Niwa
Comment 2 2022-07-03 16:31:08 PDT
EWS
Comment 3 2022-07-03 22:29:48 PDT
Committed 252110@main (e91f2366aef4): <https://commits.webkit.org/252110@main> Reviewed commits have been landed. Closing PR #2045 and removing active labels.
Tim Nguyen (:ntim)
Comment 4 2023-08-07 15:29:23 PDT
*** Bug 249420 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.