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

> Shouldn't this be about :host(:has(...))? 

No. As I said in the initial comment, `:host(:has(...))` is a separate thing that's already well-defined. This is about `:host:has(...)`.

> I think :host:has() should generally not work to be consistent with other selectors like :host:nth-child(...) (which IIRC doesn't match)

It's not clear if you've read [my later comment](https://github.com/w3c/csswg-drafts/issues/10693#issuecomment-2271806733) giving a more thorough explanation for why I think `:host:has()` is fine to match. If you have read that, could you elaborate on how you disagree?

(And correct, `:host:nth-child()` does not match. While it would not be *problematic* for it to do so, since it only has access to the information in the shadow tree and thus always sees the host element as a lone sibling, it wouldn't be *useful* for it to do so either, for the exact same reason.)

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


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

Received on Thursday, 8 August 2024 20:06:34 UTC