WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 222733
249420
:host(.foo, .bar) should be an invalid selector
https://bugs.webkit.org/show_bug.cgi?id=249420
Summary
:host(.foo, .bar) should be an invalid selector
Nolan Lawson
Reported
2022-12-15 11:43:58 PST
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
Attachments
Repro comparison in Chromium, Firefox, and WebKit
(259.11 KB, image/png)
2022-12-15 11:44 PST
,
Nolan Lawson
no flags
Details
Minimal repro
(479 bytes, text/html)
2022-12-15 11:44 PST
,
Nolan Lawson
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Nolan Lawson
Comment 1
2022-12-15 11:44:28 PST
Created
attachment 464059
[details]
Repro comparison in Chromium, Firefox, and WebKit
Nolan Lawson
Comment 2
2022-12-15 11:44:57 PST
Created
attachment 464060
[details]
Minimal repro
Radar WebKit Bug Importer
Comment 3
2022-12-22 11:44:19 PST
<
rdar://problem/103645394
>
Ahmad Saleem
Comment 4
2023-08-06 15:56:04 PDT
Safari 16.6 is now matching Chrome Canary 117 and Firefox Nightly 118 in minimal repo and it seems to be fixed now. Marking this as 'RESOLVED CONFIGURATION CHANGED" and CCing - Tim for any input.
Tim Nguyen (:ntim)
Comment 5
2023-08-07 15:29:23 PDT
*** This bug has been marked as a duplicate of
bug 222733
***
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