Re: [csswg-drafts] [css-selectors] has-child selector (#4903)

> Sure, it's only one-level ancestor, but it is not if you nest them, right? So div:has-child(div:has-child(img)) or such.

In previous discussions of this (largely predating us using GH, unfortunately), it was presumed that nesting `:has-child()` would be invalid.

So you could have `:has-child()` at multiple points in a selector, like `div:has-child(img) + label:has-child(:checked)`, but you wouldn't ever be able to recurse with it.

I assume we'd definitely impose this restriction, else this is just a less convenient way of writing `:has()`, as you say.

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

Received on Friday, 27 March 2020 18:06:12 UTC