[Webkit-unassigned] [Bug 249420] New: :host(.foo, .bar) should be an invalid selector
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 15 11:43:58 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=249420
Bug ID: 249420
Summary: :host(.foo, .bar) should be an invalid selector
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: nlawson at salesforce.com
Per the CSS spec (https://w3c.github.io/csswg-drafts/css-scoping/#host-selector), `:host()` accepts a compound selector. However, in WebKit it seems to support a selector list.
This leads to different behavior between WebKit and Chromium/Firefox in this case:
:host(.foo, .bar) { }
Chromium and Firefox ignore the selector, whereas WebKit styles a host with the "foo" class. Here is a CodePen demo: https://codepen.io/nolanlawson-the-selector/pen/gOKVBMO . (The attached HTML file is equivalent.)
In this demo, the CSS rule sets the test color to red. In WebKit the text appears red, whereas in Chromium and Firefox it appears black.
Tested in Safari Technology Preview 146 (Safari 15.4, WebKit 16614.1.14.10.6).
May be related to: https://bugs.webkit.org/show_bug.cgi?id=220532
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221215/872c49fa/attachment.htm>
More information about the webkit-unassigned
mailing list