Re: [csswg-drafts] [selectors-4] need "first-matching-sibling" combinator (#3813)

Note that there is now a separate issue for a sibling scope at-rule named `@scope-siblings`: https://github.com/w3c/csswg-drafts/issues/7751

If `:nth-sibling()` is limited to be used in a sibling-scope that would simplify the syntax, as the sibling is then defined in the at-rule prelude:


```css
@scope-siblings (.sibling) {
  :nth-sibling(1 of .target) {…}
}
```

`:nth-sibling()` could also be useful as a scope limit selector:


```css
@scope-siblings (.sibling) to (:nth-sibling(5)) {
  …
}
```




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


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

Received on Tuesday, 26 December 2023 19:43:06 UTC