Re: [csswg-drafts] [css-cascade-6] Scoped selectors shouldn't match the scope root unless explicitly requested with :scope? (#8377)

> Authors will expect these to reference the same elements:
> 
> ```css
> .media {
>   & > img { ... }
> }
> 
> @scope (.media) {
>   & > img { ... }
> }
> ```

That’s also the case with option 1, no? The way I read that option, is that inside `@scope (…) { … }` the contents are implicitly wrapped in a `:scope { }` block?

So that this … :
```css
@scope (.media) {
  & > img { ... }
}
```

… equals that:
```css
@scope (.media) {
  :scope {
    & > img { ... }
  }
}
```

That would essentially make `:scope` useless inside `@scope`, as one would need to use `&` instead … but maybe that’s OK?

---

> [Why is it that the second css-nesting comes into the picture there's a list with options and suboptions? :P]

🙈

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


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

Received on Friday, 17 February 2023 10:05:51 UTC