[csswg-drafts] [css-nesting-1] Nesting conditional rules (#7830)

sesse has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-nesting-1] Nesting conditional rules ==
Hi,

I'm working on implementing css-nesting-1 (and I hear @emilio is doing the same for Gecko). Most of the standard is fairly straightforward, but this section gives us pause:

https://csswg.sesse.net/css-nesting-1/#conditionals

This kind of free-form nesting causes a fair bit of headaches for us; we don't represent style rules and the various @media etc. stuff using the same structures in the stylesheet, and untangling that would be a fair bit of work for what seems to be a small gain. It seems also that we'd need to start merging media queries, since this kind of syntax encourages spreading them around the stylesheet N times. Finally, this allows properties directly into @media for the first time (with an implicit & selector wrapped around it), which looks pretty strange compared to how CSS looks and feels normally?

It's not _impossible_ for us to support, but it's entirely possible that we'll implementing this part even it if remains in css-nesting-1. It would be nice to take it out or punt to a future level (css-nesting-2), though.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7830 using your GitHub account


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

Received on Wednesday, 5 October 2022 11:56:31 UTC