Re: [csswg-drafts] [css-cascade] @scope as a nested grouping rule and CSSNestedDeclarations (#10431)

The CSS Working Group just discussed `[css-cascade] @scope as a nested grouping rule and CSSNestedDeclarations`, and agreed to the following:

* `RESOLVED: bare declarations in a scoped rule apply to the scoped root and add no specificity.`

<details><summary>The full IRC log of that discussion</summary>
&lt;khush> andruud: when a @scope rule is a nested grouping rule we allow bare declarations within its body. Now such declarations should be wrapped in a nested css rule.<br>
&lt;khush> the css nested declarations rule is generally defined to match whatever the parent selector matches<br>
&lt;khush> with same specificity behaviour<br>
&lt;khush> butt this may not make sense for at-scope since it's not how implicit selector stuff works for scope in general<br>
&lt;khush> so we should have nested css declation rule inside nested matches the scoping root with no specificity<br>
&lt;khush> astearns: this matches miriam's proposal?<br>
&lt;matthieud> s/inside nested/inside scope<br>
&lt;khush> miriam: yes. scopes don't add specificicity which matches this. bare declarations in the scope matches the scope root.<br>
&lt;khush> andruud: when it's not nested, it's not allowed. separate open issue<br>
&lt;khush> miriam: this matches previous stamenents. +1<br>
&lt;khush> astearns: from glancing at your last comment, there are other things to resolve on this?<br>
&lt;khush> miriam: they'll fall out so let's be clear.<br>
&lt;khush> one resolution was to serialize the implicit scope but that adds specificity. so we need to change that to work the same way, implicit scope is wrapped in a ware pseudo class which hides the specificity of selectors inside it<br>
&lt;khush> also allow declarations directly inside scope<br>
&lt;khush> astearns: so nested related issues<br>
&lt;khush> miriam: doing all will get consistent behaviour<br>
&lt;khush> astearns: sounds like if we're serializing the bare decls in a scope such that they are wrapped in a ware pseudo?<br>
&lt;khush> andruud: if the ware pseudo is implicitly added it should not be serialized<br>
&lt;khush> astearns: no problem then<br>
&lt;khush> astearns: any other comments?<br>
&lt;matthieud> s/ware/:where<br>
&lt;astearns> :where<br>
&lt;miriam> :where(:scope)<br>
&lt;khush> matthieud: it's not directly related to this issue but in general what's the meaning of something nested in a rule. It's just gonna have specificity of pseudo-class of 1. We need to add specificty of each layer or cascading won'y work<br>
&lt;khush> miriam: it puts the implicit &amp; in the scoped rule. so the scoped root is a nested selector of the parent<br>
&lt;khush> andruud: this is an existing issue?<br>
&lt;khush> matthieud: resolution won't change the behaviour but wanted to bring this up.<br>
&lt;khush> astearns: so should we resolve on what we were first discussing and then go through each implication in turn?<br>
&lt;khush> miriam: not sure how well the resolution is on the issue<br>
&lt;khush> miriam: for this one, where declarations in scope should be treated as a css nested declaration?<br>
&lt;khush> andruud: the where declarations apply to the scoping root with no extra specificity<br>
&lt;khush> astearns: it's not where and bare declarations in the above<br>
&lt;khush> matthieud: do we want specifity of the start or the complete selector which could be more complext<br>
&lt;khush> miriam: scoped root doesn't add specificty, only when you use &amp; or :scope. If you're adding a bare declaration then no specificty added<br>
&lt;khush> astearns: proposed resiltion, bare declarations in a scoped rule apply to the scoped root and add no specificty.<br>
&lt;khush> astearns: objections?<br>
&lt;khush> RESOLVED: bare declarations in a scoped rule apply to the scoped root and add no specificity.<br>
&lt;khush> astearns: other related issues?<br>
&lt;khush> miriam: clarify serialization. we can't serialize it with :scope. Won't do what we just resolved.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10431#issuecomment-2207475954 using your GitHub account


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

Received on Wednesday, 3 July 2024 23:19:40 UTC