Re: [csswg-drafts] [css-nesting-1] Name, terminology, and nesting selector misnomers are footguns (solution proposed) (#8329)

> Except it's not really a style rule inside a style rule, is it? It's a shorthand for an at-rule

I have no idea what you mean. Only `@scope` is an at-rule; Nesting isn't.

> But with :scope allowed in any position? If so, it's already doing what I suggest, just not explicitly indicated as such. If not, then that's unnecessarily limiting :scope to the start a selector only.

Yes, :scope allowed anywhere. I'm not sure what point you're making here, tho.

> Why would you need to use them together in that way?

Why wouldn't you? It's a perfectly reasonable selector. `@scope (.one) { .two { :scope.three * {...}}}` is equivalent to `@scope (.one) { :scope.three .two * {...}

> Except if nesting was scoping, they have the same semantic meaning.

Right, but what I'm saying is they *don't* have the same semantic meaning, so nesting *isn't* scoping. The different semantics correspond to different behaviors and different use-cases. Trying to collapse them loses a lot of valuable stuff.

> How is that not scoped?

[Scoping has a meaning.](https://w3c.github.io/csswg-drafts/selectors/#scoping) `:not(&)` isn't scoped by that meaning, nor by a more casual meaning - the elements being selected come from anywhere on the page, with no particular relationship to the elements from the parent rule besides being "not them".

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


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

Received on Wednesday, 25 January 2023 22:22:36 UTC