Re: [csswg-drafts] [css-nesting-1] Allow conditional nested rules to adopt context (#6483)

The CSS Working Group just discussed `[css-nesting-1] Allow conditional nested rules to adopt context`, and agreed to the following:

* `RESOLVED: conditionals nested into style rules have their contents parsed the same as style rules (so raw properties are allowed)`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: [css-nesting-1] Allow conditional nested rules to adopt context<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/pull/6483#issuecomment-891359090<br>
&lt;dael> TabAtkins: currently in nesting we have text to let you nest conditional into style. But we don't change the interior of nested media rule. Only accepts more rules.<br>
&lt;dael> TabAtkins: If all you wanted to do is set a particular prop when a media matches you have to write a rule with a &amp; as a selector to let you put property<br>
&lt;dael> TabAtkins: Prop is extend mixture of properties to also apply to nested conditional rules so if it's directly nested inside a conditional you can put it in<br>
&lt;dael> TabAtkins: Example in issue<br>
&lt;TabAtkins> .foo {<br>
&lt;TabAtkins>   display: grid;<br>
&lt;TabAtkins> <br>
&lt;TabAtkins>   @media (orientation: landscape) {<br>
&lt;TabAtkins>     grid-auto-flow: column;<br>
&lt;TabAtkins>   }<br>
&lt;TabAtkins> }<br>
&lt;heycam> q+<br>
&lt;dael> astearns: Adam put current and proposed. Would both work or only proposed?<br>
&lt;dael> TabAtkins: Both would work. Putting full rules is allow, but not required when you're only styling element from outside<br>
&lt;jensimmons> The proposed syntax is *far* better for Authors. Having both work is a good idea, for those who think that's the only way it will work.<br>
&lt;astearns> ack heycam<br>
&lt;dael> heycam: That proposed one you have @media as direct child. What would happen if you used &amp; in some other rule?<br>
&lt;dael> TabAtkins: That's spec already. Contents of nest conditional rules do inherit nesting selector context. Their &amp; resolves to the nearest parent style rule<br>
&lt;dael> TabAtkins: The other example shows how you would write it today with an &amp;<br>
&lt;TabAtkins> .foo {<br>
&lt;TabAtkins>   display: grid;<br>
&lt;TabAtkins> <br>
&lt;TabAtkins>   @media (orientation: landscape) {<br>
&lt;TabAtkins>     &amp; {<br>
&lt;TabAtkins>       grid-auto-flow: column;<br>
&lt;TabAtkins>     }<br>
&lt;TabAtkins>   }<br>
&lt;TabAtkins> }<br>
&lt;dael> TabAtkins: That will continue to work and &amp; inherits content from the outside<br>
&lt;dael> astearns: See support from jensimmons<br>
&lt;dael> astearns: Other comments?<br>
&lt;dael> astearns: Anyone against allowing or concerns about allowing this?<br>
&lt;dael> astearns: Prop: Not require the &amp; syntax inside?<br>
&lt;dael> TabAtkins: I'll write in IRC<br>
&lt;TabAtkins> proposed: conditionals nested into style rules have their contents parsed the same as style rules (so raw properties are allowed)<br>
&lt;dael> astearns: Any objections?<br>
&lt;dael> RESOLVED: conditionals nested into style rules have their contents parsed the same as style rules (so raw properties are allowed)<br>
&lt;dael> TabAtkins: That was last major issue before FPWD so we will be publishing very soon (we have the resolution to publish)<br>
</details>


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


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

Received on Wednesday, 4 August 2021 23:32:28 UTC