Re: [csswg-drafts] [css-nesting-1] Allow relative selector syntax in `@nest` rules. (#7854)

The CSS Working Group just discussed `Allow relative selector syntax in @nest rules`, and agreed to the following:

* `RESOLVED: allow relative selectors for both nesting and @scope`

<details><summary>The full IRC log of that discussion</summary>
&lt;emeyer> Topic: Allow relative selector syntax in @nest rules<br>
&lt;emeyer> GitHub: https://github.com/w3c/csswg-drafts/issues/7854<br>
&lt;emeyer> fantasai: We had talked about adopting relative selectors as a way of writing nested selectors<br>
&lt;emeyer> …Thus is you have a combinator, you could just write it without prefixing with an ampersand (&amp;)<br>
&lt;emeyer> …I believe all proposed syntaxes can accept having relative selectors<br>
&lt;emeyer> …I propose we allow that for all of them<br>
&lt;emeyer> …In option 1, you can only put a relative after @nest, but you wouldn’t need an &amp;<br>
&lt;fantasai> s/you can/one proposal is you can/<br>
&lt;lea> +1 for relative selectors, +1 for not requiring @nest (the less @nest the better...)<br>
&lt;emeyer> fremy: We can also do this for @scope<br>
&lt;emeyer> fantasai: I believe that’s correct<br>
&lt;emeyer> miriam: I don’t remember if we clarified that, but I agree it should work<br>
&lt;emeyer> fantasai: I’ll break this down<br>
&lt;emeyer> …Do we want to allow relative selectors for nesting and @scope?<br>
&lt;emeyer> Rossen: Feedback or objections?<br>
&lt;flackr> q+<br>
&lt;emeyer> flackr: It’s a bit odd that we support all selectors except descendant because of the parsing ambiguousness<br>
&lt;Rossen_> ack flackr<br>
&lt;emeyer> Rossen: Still not hearing objections, so will call this resolved<br>
&lt;miriam> scope spec says :scope is assumed at the start of selectors, which is similar to allowing this (but not entirely explicit)<br>
&lt;argyle> i like the relative selector feature as nesting 2<br>
&lt;emeyer> RESOLVED: allow relative selectors for both nesting and @scope<br>
&lt;fantasai> Note: @scope already has this<br>
&lt;fremy> proposal is we allow `@nest > x` == `@nest &amp; > x`<br>
&lt;emeyer> fantasai: The next piece is that for option 1 syntax, where you have to start with an ampersand, do we require it @nest?<br>
&lt;emeyer> lea: The less @nest, the better<br>
&lt;emeyer> TabAtkins: I don’t think it’s useful to discuss option 1 syntax since we don’t know if we’re going to use it<br>
&lt;astearns> q+<br>
&lt;emeyer> fantasai: Whether descendant selectors are allow ing nesting will depend on a following discussion<br>
&lt;emeyer> astearns: Because of the weirdness about descendant selectors, should we define an actual optional syntax for descendant selectors in nest and @scope situations?<br>
&lt;fantasai> s/allow ing/allowed to be written as relative selectors in/<br>
&lt;Rossen_> ack astearns<br>
&lt;emeyer> TabAtkins: I think we should but that should be a different discussion<br>
&lt;emeyer> Rossen: Please open an issue on that if we don’t already have one, Alan?<br>
&lt;emeyer> …Anything else on this topic?<br>
&lt;emeyer> (no)<br>
&lt;Rossen_> https://github.com/w3c/csswg-drafts/blob/main/css-nesting-1/proposals.md<br>
&lt;TabAtkins>   /me I propose in the next topic we have a quick refresher on the options (happy to do it, or elika or lea), then have a shortish comment period, then straw poll.<br>
&lt;fantasai> -> https://github.com/w3c/csswg-drafts/blob/main/css-nesting-1/proposals.md<br>
&lt;emeyer> lea: If you followed all this and have an opinion but haven’t recorded a vote, please do so!<br>
</details>


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


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

Received on Wednesday, 26 October 2022 14:58:01 UTC