Re: [csswg-drafts] [css-values] Extend sibling-index() and sibling-count() with a selector argument (#9572)

This is something I'd really want to have, and I encountered a few places where it could be very helpful while working on my [latest article](https://kizu.dev/tree-counting-and-random/).

In https://github.com/w3c/csswg-drafts/issues/11069 @nt1m asked:

> How does this work with shadow DOM / slotted content?

I think this is something that should be decided generally for any selectors _as values_, and I'll copy my comment from there:

> It would need to work consistently with, but I can see how this can be a complex issue, as I don't think we handled selectors inside values before, so it is tricky to define how they should work across boundaries.
> 
> Like, my first intuition is to make it work the same other selectors work: if it is defined in the light DOM, then it should only select light DOM stuff, and vice versa. But that means that the selector itself will need to somehow be coupled with its origin, as the value itself could be inherited across the boundaries.

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


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

Received on Wednesday, 23 October 2024 07:55:58 UTC