Re: [csswg-drafts] [css-cascade-6] Mixed Nesting / Scoping (#8518)

This is defined in Nesting: <https://w3c.github.io/csswg-drafts/css-nesting/#nesting-at-scope>

> When the [@scope](https://w3c.github.io/csswg-drafts/css-cascade-6/#at-ruledef-scope) rule is a [nested group rule](https://w3c.github.io/csswg-drafts/css-nesting/#nested-group-rules), an [&](https://w3c.github.io/csswg-drafts/css-nesting/#selectordef-) in the [<scope-start>](https://w3c.github.io/csswg-drafts/css-cascade-6/#typedef-scope-start) selector refers to the elements matched by the nearest ancestor style rule.
>
> For the purposes of the style rules in its body and its own [<scope-end>](https://w3c.github.io/csswg-drafts/css-cascade-6/#typedef-scope-end) selector, the [@scope](https://w3c.github.io/csswg-drafts/css-cascade-6/#at-ruledef-scope) rule is treated as an ancestor style rule, matching the elements matched by its [<scope-start>](https://w3c.github.io/csswg-drafts/css-cascade-6/#typedef-scope-start) selector.

It's equivalent to your second option - the scope-start selector is treated as a nested selector wrt the parent style rule, but the scope-end selector and all child style rules are counted as nested by the scope-start selector. (Using @scope's rules for nesting, but interpreting an `&` as described.)

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


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

Received on Thursday, 2 March 2023 20:49:29 UTC