- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 04 Aug 2021 23:32:26 +0000
- To: public-css-archive@w3.org
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>
<dael> Topic: [css-nesting-1] Allow conditional nested rules to adopt context<br>
<dael> github: https://github.com/w3c/csswg-drafts/pull/6483#issuecomment-891359090<br>
<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>
<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 & as a selector to let you put property<br>
<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>
<dael> TabAtkins: Example in issue<br>
<TabAtkins> .foo {<br>
<TabAtkins> display: grid;<br>
<TabAtkins> <br>
<TabAtkins> @media (orientation: landscape) {<br>
<TabAtkins> grid-auto-flow: column;<br>
<TabAtkins> }<br>
<TabAtkins> }<br>
<heycam> q+<br>
<dael> astearns: Adam put current and proposed. Would both work or only proposed?<br>
<dael> TabAtkins: Both would work. Putting full rules is allow, but not required when you're only styling element from outside<br>
<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>
<astearns> ack heycam<br>
<dael> heycam: That proposed one you have @media as direct child. What would happen if you used & in some other rule?<br>
<dael> TabAtkins: That's spec already. Contents of nest conditional rules do inherit nesting selector context. Their & resolves to the nearest parent style rule<br>
<dael> TabAtkins: The other example shows how you would write it today with an &<br>
<TabAtkins> .foo {<br>
<TabAtkins> display: grid;<br>
<TabAtkins> <br>
<TabAtkins> @media (orientation: landscape) {<br>
<TabAtkins> & {<br>
<TabAtkins> grid-auto-flow: column;<br>
<TabAtkins> }<br>
<TabAtkins> }<br>
<TabAtkins> }<br>
<dael> TabAtkins: That will continue to work and & inherits content from the outside<br>
<dael> astearns: See support from jensimmons<br>
<dael> astearns: Other comments?<br>
<dael> astearns: Anyone against allowing or concerns about allowing this?<br>
<dael> astearns: Prop: Not require the & syntax inside?<br>
<dael> TabAtkins: I'll write in IRC<br>
<TabAtkins> proposed: conditionals nested into style rules have their contents parsed the same as style rules (so raw properties are allowed)<br>
<dael> astearns: Any objections?<br>
<dael> RESOLVED: conditionals nested into style rules have their contents parsed the same as style rules (so raw properties are allowed)<br>
<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