Re: [csswg-drafts] [css-selectors] Nearest descendant selector (#4940)

I am also in need of this.
This would be ideal for nested components, but allow for custom markup. As long as the developer follows your class name convention then it should work. Maybe the developer wants to wrap the child with a `overflow: hidden, position: relative` element, etc.

However, since this is similar to `:first-child` maybe we just need `:first-descendant` and `:last-descendant`
```
.wrapper .child:first-descendant
```

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


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

Received on Wednesday, 4 December 2024 04:10:57 UTC