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

Yeah, 2b is semantically 'cleaner' in some ways (both selectors maintain their behavior), but I think this would be very surprising to authors, and not a meaningful way of supporting `&` in a scoped context. Authors will expect these to reference the same elements:

```css
.media {
  & > img { ... }
}

@scope (.media) {
  & > img { ... }
}
```

In the current spec, that works because we don't imply an initial `:scope`. But if we go with 2a, we've broken that expectation.

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


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

Received on Thursday, 16 February 2023 20:35:30 UTC