Open
Description
I just realized that WebKit (but not Blink nor Gecko) parse the following selector as valid:
:host(::before)
(or :host(::before)::before
for that matter).
I was going to file a WebKit bug, but then realized that the grammar technically allows it. This also applies to the grammar of :is
/ :where
(old :matches
) etc.
I think that's wrong and pseudo-elements should not be allowed in nested selectors. WebKit itself doesn't parse, e.g., :not(::before)
, so they're not consistent about it.