Re: [csswg-drafts] [css-nesting] Syntax suggestion (#4748)

The CSS Working Group just discussed `Nesting syntax`, and agreed to the following:

* `RESOLVED: Revert the previous resolution from Nov 2021 mandating bracket-nesting syntax, and the WG preference for a single nesting syntax.`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: Nesting syntax<br>
&lt;TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/4748<br>
&lt;fantasai> ScribeNick: fantasai<br>
&lt;fantasai> TabAtkins: Some time ago we had a discussion about what style of nesting syntax should use<br>
&lt;fantasai> TabAtkins: major options are what I drafted, nesting selector directly with an &amp;<br>
&lt;fantasai> TabAtkins: or use @nest if needed<br>
&lt;fantasai> TabAtkins: option 2 is @nest always<br>
&lt;fantasai> TabAtkins: and option 3 is using brackets to wrap nested rules, never use @nest<br>
&lt;fantasai> TabAtkins: At the time we did a straw poll, and WG resolved on using brackets<br>
&lt;fantasai> TabAtkins: I was unhappy with this and we resolved to take it back for more data collection or arguments<br>
&lt;fantasai> TabAtkins: Adam Argyle ran a poll with significant response numbers about this<br>
&lt;TabAtkins> https://developer.chrome.com/blog/help-css-nesting/<br>
&lt;TabAtkins> https://github.com/w3c/csswg-drafts/issues/4748#issuecomment-1211280306<br>
&lt;fantasai> TabAtkins: Linked article, I think was written fairly<br>
&lt;fantasai> TabAtkins: It seems responses are incredibly one-sided<br>
&lt;fantasai> TabAtkins: Using &amp; or @nest directly<br>
&lt;fantasai> TabAtkins: This is what's in the current spec and what I prefer<br>
&lt;fantasai> TabAtkins: This was an overwhelming response in favor of one option<br>
&lt;fantasai> TabAtkins: So suggestion is to revert previous resolution and keep syntax in current spec<br>
&lt;astearns> option 1 also allows you to write as if @nest is always required<br>
&lt;Rossen_> ack fantasai<br>
&lt;miriam> q+<br>
&lt;TabAtkins> fantasai: The problem I noticed reading thru the thread is the bracketed syntax was represented as always putting in the ampersand, while the point of bracketed syntax was to avoid needing it<br>
&lt;TabAtkins> fantasai: So I dont' think that's true that it was fairly written<br>
&lt;TabAtkins> TabAtkins: I didn't take that as part of the syntax at all, still needed the &amp; to be the nesting selector<br>
&lt;TabAtkins> fantasai: The point was that it was mostly never needed, so I think the poll wasn't valid<br>
&lt;TabAtkins> miriam: I reviewed the article and helped come up with the syntax, so...<br>
&lt;Rossen_> ack miriam<br>
&lt;TabAtkins> miriam: I didn't think of removing the &amp; as the main advantage of the brackets<br>
&lt;TabAtkins> miriam: As I was writing it I foudn the brackets more confusing than expected, and I actually *added* ampersands for clarity<br>
&lt;TabAtkins> miriam: AFter writing the demos I actually changed my mind away from bracketing<br>
&lt;TabAtkins> fantasai: I'm not going to block, if y'all liek this syntax better that's fine. I just don't like having an inconsistent syntax.<br>
&lt;TabAtkins> fantasai: I just don't think it's fair to say it was overwhelmingingly in one direction<br>
&lt;TabAtkins> Rossen_: So it sounds like we have a pretty strong response. Possibly biased, but Mia makes an argument for it not being so.<br>
&lt;fantasai> I really don't like the inconsistency, where you have to know when to use @nest<br>
&lt;Rossen_> q?<br>
&lt;TabAtkins> Rossen_: So proposed resolution is to undo the resolutions from november and leave the spec as it currentyl is<br>
&lt;TabAtkins> Rossen_: Any additional comments or feedback?<br>
&lt;TabAtkins> fantasai: I'm not gonna object because everyone seems to like it, but I really don't like that authors have to know when to use @nest, it's not a consistent syntax<br>
&lt;TabAtkins> fantasai: And I wish we had something else besides an inconsistent syntax<br>
&lt;TabAtkins> fantasai: I don't like @nest everywhere since it's verbose, but...<br>
&lt;TabAtkins> miriam: I agree on the problem and it's why I liked bracket before. I agree it's an issue and it's weird<br>
&lt;TabAtkins> miriam: But once I started writing examples, it almost all basic use-cases you just use the &amp; and it works and looks cleaner.<br>
&lt;TabAtkins> miriam: and there are only rare cases where you need to use @nest and it's not as hard as I initially thought to know the difference<br>
&lt;TabAtkins> miriam: So that's why I changed my mind even tho I agree it's inconsistent<br>
&lt;bradk> +1 to miriam<br>
&lt;TabAtkins> plinss: I think elika has a valid point and before we decide on this we could make another design phase to try to come up with another route.<br>
&lt;fantasai> I'm not so opposed to the &amp; , just that some rules require @nest and others dont'<br>
&lt;TabAtkins> plinss: I'm okay with undoing the previous resolution, just not sure we shoudl resolve affirmatively on the current syntax<br>
&lt;TabAtkins> Rossen_: Right, so let's just resolve on undoing the previous resolution.<br>
&lt;TabAtkins> Rossen_: Objections?<br>
&lt;TabAtkins> RESOLVED: Revert the previous resolution from Nov 2021 mandating bracket-nesting syntax, and the WG preference for a single nesting syntax.<br>
&lt;TabAtkins> Rossen_: And for the record, want to strongy encourage continued improvement of the design.<br>
</details>


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


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

Received on Wednesday, 31 August 2022 16:43:27 UTC