Re: [csswg-drafts] [selectors-4] Disallow pseudo-elements inside :has() (#7463)

Now that :has() is unforgiving we need to make a distinction whether pseudo-elements inside are _invalid_ or just don't match. The current text is

> Also, unless explicitly defined as a :has-allowed pseudo-element, [pseudo-elements](https://drafts.csswg.org/selectors/#pseudo-element) **are not valid selectors** within :has(). (This specification does not define any [:has-allowed pseudo-elements](https://drafts.csswg.org/selectors/#has-allowed-pseudo-element), but other specifications may do so.)

If they're not valid that invalidates the whole selector, presumably at parse time. But that's not the current behaviour of Webkit or Chrome, and that doesn't match the `relative-selector-list` syntax either.

I think this text should be changed from "are not valid selectors" to "do not match"


-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7463#issuecomment-1427690150 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 13 February 2023 10:24:19 UTC