[csswg-drafts] [selectors][css-scoping] Should `:host:has()` match? (#10693)

tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [selectors][css-scoping] Should `:host:has()` match? ==
In <https://github.com/web-platform-tests/wpt/pull/47441> a few tentative tests are suggested that test whether `:host:has(...)` works. The test author correctly notes that this isn't currently specified to work - only the [logical combination pseudo-classes are allowed to match featureless elements](https://drafts.csswg.org/selectors/#featureless) and `:has()`, while defined in the "logical combination" section, isn't on the list of logical combo pseudo-classes.

I agree with the tester, tho, that this *should* work. `:host h1` works just fine, so `:host:has(h1)` should work the same. I suggest that we add `:has()` to the list of pseudo-classes allowed to work on featureless elements.

(Note the first few tests in the WPT PR are testing the different scenario of `:host(:has(...))`, which *is* already well-defined to match, in a different way to what's discussed here. I'm talking about the latter three which are marked "tentative" in their filenames.)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10693 using your GitHub account


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

Received on Monday, 5 August 2024 20:05:15 UTC