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

@una Note that if you use multiple `:has-child()` chained one after the other, you will just impose additional constraints to the *same* element. So

```css
ancestor:has-child(.container):has-child(.celebrate) {}
```

should behave like

```css
ancestor:has-child(.container.celebrate, .container ~ .celebrate, .celebrate ~ .container) {}
```

In order to go "two levels up" from `.container > .celebrate`, you would need nesting:

```css
ancestor:has-child(.container:has-child(.celebrate)) {}
```

which some comments above assumed wouldn't be allowed.

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

Received on Wednesday, 29 April 2020 22:44:58 UTC