- From: Rich Harris via GitHub <sysbot+gh@w3.org>
- Date: Wed, 17 Nov 2021 21:16:13 +0000
- To: public-css-archive@w3.org
Personally I would argue that the pseudo-class approach is a bit counterintuitive, since normally a pseudo-class _narrows_ a selector rather than expanding it:
```css
div { /* matches all divs */ }
div:last-child { /* narrows selection to divs that are the last child */ }
```
I would find it much more natural if it was part of the scope itself — either with something like an `exclusive` keyword...
```css
@scope ([data-scope='main-component']) to ([data-scope]) exclusive {...}
```
...or, if `exclusive` were the default (which I would definitely advocate for, partly given my own use cases but mostly because inclusive semantics can be expressed with exclusive semantics but not vice versa):
```css
/* this... */
@scope ([data-scope='main-component']) to ([data-scope]) inclusive {...}
/* ...is sugar for this */
@scope ([data-scope='main-component']) to ([data-scope] > *) {...}
```
--
GitHub Notification of comment by Rich-Harris
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6577#issuecomment-972041822 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 17 November 2021 21:16:15 UTC