Re: [csswg-drafts] [selectors] Validity of selectors nesting :has(), :is() and :has() (#8441)

As currently written, the spec requires the *inner* `:has()` to be the one that's invalid. The outer `:has()` just provides a parsing context that causes the invalidity; it doesn't care, itself, about why something is invalid inside of it. (And avoiding this sort of inconsistency is why the spec is written as it is, rather than invalidating the outer `:has()`.)

So in both cases, the selectors are valid, but the `:is()` discards its arguments due to the nested `:has()` being invalid. So your option 1 is correct.

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


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

Received on Tuesday, 21 February 2023 23:59:26 UTC