Re: [csswg-drafts] [css-cascade-6] Specificity of Implicitly-Added `:scope` in Scoped Rules (#10196)

It was intentional, and designed to match e.g. `:root`. The goal is for the scope rule itself not to impact specificity, while both `:scope` and `&` selectors can reference it in different ways, and bring their own specificity implications to bear. I don't like either of the alternatives:

- `:scope` has been around for some time, and it makes sense for it to have a pseudo-class specificity (since that's what it is)
- We do not want to add an arbitrary pseudo-class specificity to all scoped selectors, and it becomes extra confusing if `:scope` has a specificity, but adding/removing `:scope` from the selector has no specificity impact.

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


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

Received on Wednesday, 10 April 2024 21:40:19 UTC