Re: [csswg-drafts] [css-nesting] Choose Nesting syntax — Option 3, 4 or 5? (#8248)

The CSS Working Group just discussed `[css-nesting] Choose Nesting syntax — Option 3, 4 or 5?`, and agreed to the following:

* `RESOLVED: Reject options 4 and 5, go with option 3 with continuing refinement`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> jensimmons: We ran this survey and wrote an article on webkit.org<br>
&lt;TabAtkins> jensimmons: Even tho it was bumpy, i think the reuslts are very clear<br>
&lt;TabAtkins> jensimmons: There's a lot of comments on twitter/masto/HN<br>
&lt;TabAtkins> jensimmons: And a very clear pref for Option 3<br>
&lt;nigel> s/NIgel_Megitt/Nigel_Megitt<br>
&lt;plinss> q+<br>
&lt;TabAtkins> TabAtkins: sounds like strong consensus<br>
&lt;TabAtkins> plinss: I have concerns.<br>
&lt;TabAtkins> plinss: I don't think we should decide purely by the poll.<br>
&lt;TabAtkins> plinss: That'd be fair if we had 2 or 3 options that were equiv<br>
&lt;Rossen_> ack plinss<br>
&lt;TabAtkins> plinss: But I think this is more involved than that, there are ramifications people werne't taking into account<br>
&lt;TabAtkins> plinss: Looks like a lot of people just want Sass, that's most votes for Option 3.<br>
&lt;astearns> q+<br>
&lt;TabAtkins> plinss: And the more I think about it, the more concerns I have with mixing selectors and properties.<br>
&lt;TabAtkins> plinss: Really not happy with the future constraints we're putting on the language.<br>
&lt;TabAtkins> plinss: Fundamental problem is tha tanything that's not obviously a property defaults to be a selector, adn that constraitns our abilitiy to ever extend property syntax again.<br>
&lt;TabAtkins> plinss: The default needs to be that it's a property and we need an indicator that it's a selector<br>
&lt;astearns> q-<br>
&lt;Rossen_> q?<br>
&lt;TabAtkins> plinss: Like @nest. I know that was rejected for verfbosity, but I'd be okay with a bare @<br>
&lt;TabAtkins> plinss: A lot of people are also supportive of OPtion 3 with mandatory &amp;, and we could have @ do that.<br>
&lt;TabAtkins> plinss: So that's a compromise I can live with.<br>
&lt;TabAtkins> q+<br>
&lt;TabAtkins> astearns: I think I agree with peter to a certain extent, but I would want to have an idea of the kinds of things we are cutting ourselves off from<br>
&lt;TabAtkins> astearns: I don't know what it is that prioritizing selectors over props will make difficult to extend in the future<br>
&lt;TabAtkins> plinss: For example, I think we wouldn't hav e been able to do custom props the way we did if we had this<br>
&lt;TabAtkins> plinss: Once upon a time idents started with a letter or a single dash, and I'm not sure what else we'll want to do with properties, but we'll have to invent some weird syntax.<br>
&lt;TabAtkins> astearns: I think I agree with the argument that if Sass nesting had never existed, that when we were adding this feature we'd do something more like option 5; we wouldn't consdier option 3 at all.<br>
&lt;TabAtkins> astearns: but the existence of Sass nesting is a design constraint that we really do have to respond to, and option 3 does do that<br>
&lt;TabAtkins> plinss: Another alt is we say screw it and adopt the sass syntax<br>
&lt;TabAtkins> plinss: A lot of people are opposed, but i'm curious if we can't afford it.<br>
&lt;TabAtkins> plinss: Back when we first started this, at Gecko, I had everyone telling us we couldn't do CSS due to perf.<br>
&lt;TabAtkins> plinss: Maybe we can afford a recursive descent parser now and do Sass syntax.<br>
&lt;TabAtkins> plinss: And tha'ts something I'd be okay with too.<br>
&lt;fantasai> s/too/too, because you're fully resolving everything/<br>
&lt;TabAtkins> plinss: I think it sitll gives us some potential for conflict but it's not as bad.<br>
&lt;fantasai> scribe+<br>
&lt;fantasai> TabAtkins: What we are prevented from extending in the future<br>
&lt;fantasai> TabAtkins: 2 aspects: need to avoid selectors and ??<br>
&lt;fantasai> TabAtkins: on selector side, means we can never add a new bare function syntax<br>
&lt;fantasai> TabAtkins: We have pseudo-classes that are functional, that's fine. But we can't add a plain function to selectors<br>
&lt;fantasai> TabAtkins: That doesn't seem like it would be a problem, lots of space for symbol-prefixed<br>
&lt;fantasai> TabAtkins: over on properties, need to start property with either ident or function<br>
&lt;fantasai> TabAtkins: can put stuff after ident/function<br>
&lt;fantasai> TabAtkins: just can't put before the property<br>
&lt;fantasai> TabAtkins: That does mean if we had done this in the past, we'd have had to do some compat analysis about allowing ident to have --start<br>
&lt;Rossen_> ack TabAtkins<br>
&lt;fantasai> TabAtkins: that was a change, but technically also needed to care about compat because previously invalid now valid<br>
&lt;fantasai> TabAtkins: those sorts of changes are likely ... if we need to change ident syntax in the future, we can navigate those, and unlikely to look like selectors too much<br>
&lt;fantasai> TabAtkins: doubt problem, and we have compat tools to figure it out<br>
&lt;fantasai> TabAtkins: beyond changing ident syntax, I don't think we're losing any important syntax space<br>
&lt;fantasai> TabAtkins: some ideas to put things before the properties, e.g. early sketches of additive cascade used + before/after property name to indicate prepend/append<br>
&lt;fantasai> TabAtkins: but we can choose an alternative syntax<br>
&lt;fantasai> TabAtkins: in practice not a large restriction<br>
&lt;fantasai> TabAtkins: large amount of syntax space we've left unexplored<br>
&lt;fantasai> TabAtkins: and rare places where might collide, can analyze so not shooting in the dark<br>
&lt;fantasai> TabAtkins: More generally, we've been talking about nesting syntax for a year, need to close the door at some point<br>
&lt;fantasai> TabAtkins: can't keep having ppl propose new alternatives<br>
&lt;fantasai> TabAtkins: latest option 3 is good improvement, and people like it<br>
&lt;fantasai> TabAtkins: if we continue messing around, and ignoring things like 80%-90% poll results, is going to make ppl angry, and won't accomplish anything<br>
&lt;fantasai> TabAtkins: more polls will result in similar result<br>
&lt;argyle> q+<br>
&lt;jensimmons> q+<br>
&lt;fantasai> Rossen_: Want to close the discussion, lots of tension but I also want to get to at least one more issue<br>
&lt;fantasai> Rossen_: will close the queue, drain it, and if we can't have a path for resolution, then we'll put to GH<br>
&lt;TabAtkins> plinss: I hear what your'e saying about syntax<br>
&lt;fantasai> plinss: I hear what you're saying about syntax, but just want to be clear that we're blocking ourselves off from prepending to an ident. I think it's a decision we'll reget<br>
&lt;TabAtkins> plinss: We're blocking ourselves from prepending a property with anything that's not an ident, and I think we'll regret that<br>
&lt;TabAtkins> plinss: I think default to selectors was the wrong choice here<br>
&lt;TabAtkins> plinss: I'm sympathetic to "we've discussed forever"<br>
&lt;TabAtkins> plinss: But don't think we should take a decision that has problems we haven't throught thru<br>
&lt;TabAtkins> plinss: We ahve responsibility for th elong term<br>
&lt;TabAtkins> plinss: No t just to respond to the long term<br>
&lt;TabAtkins> fantasai: I'm sympathetic to peter's arguments but also agree with TAb that we need to clsoe on this<br>
&lt;TabAtkins> fantasai: In term sof forward compat, we shoudl be setting things up within these decl blocks that the parse stops at either a semicolon or a block<br>
&lt;TabAtkins> fantasai: and you throw out whatever as invalid<br>
&lt;Rossen_> ack fantasai<br>
&lt;TabAtkins> fantasai: Gives us some space to work with<br>
&lt;TabAtkins> fantasai: So we shoudl design invalid in a way that gives us room to extend<br>
&lt;Rossen_> Zakim close queue<br>
&lt;TabAtkins> fantasai: think we can<br>
&lt;TabAtkins> fantasai: and if there's specific bits of syntax we want to leave open for extensions, we can do that<br>
&lt;TabAtkins> fantasai: like if it starts with @ without an at-rule treat as a prop, etc<br>
&lt;TabAtkins> fantasai: But I think we should go with Option 3 as we have it now. Maybe small tweaks to nesure max compatibility, but think we shoudl go with that for now<br>
&lt;Rossen_> ack argyle<br>
&lt;TabAtkins> argyle: Happy to see this discussed<br>
&lt;TabAtkins> argyle: Wanted to mention we can't do exact Sass syntax. We can match as much as we can, but "just do Sass" isn't on the table. We've adopted as many tradeoffs we can.<br>
&lt;TabAtkins> argyle: So I think this has been in the tumbler enough to be a pearl<br>
&lt;bradk> +1 to possibly prepending ‘@‘ in the future to indicate it is a selector that follows<br>
&lt;TabAtkins> argyle: I like where we are now with all the options<br>
&lt;TabAtkins> (Happy to take an issue for that btw)<br>
&lt;TabAtkins> jensimmons: I think last time I expressed my opinion I was agaisnt option 3 and liked 4, and liked 5 when it came up<br>
&lt;TabAtkins> jensimmons: But while writing the article I started really hating OPtion 4 with a passion. There's still something about 5 that appeals, but I really think we should resolve on option 3, hopefully today<br>
&lt;lea> q?<br>
&lt;TabAtkins> jensimmons: I agree with Peter that a lot of people potentially didn't understand the gotchas with 3<br>
&lt;Rossen_> ack jensimmons<br>
&lt;Rossen_> Zakim, close queue<br>
&lt;Zakim> ok, Rossen_, the speaker queue is closed<br>
&lt;TabAtkins> jensimmons: But there were so manyc omments from people who really did udnerstand the gotchas, including several asking for madatory ampersand<br>
&lt;TabAtkins> jensimmons: So I think there is enough understanding from webdevs<br>
&lt;fantasai> s/madatory ampersand/mandatory ampersand as a way to compensate<br>
&lt;TabAtkins> jensimmons: Also convos internally in Apple - maybe we will find a way to do lookahead that's fast enough.<br>
&lt;TabAtkins> jensimmons: so we would be able to relax the syntax restriction<br>
&lt;TabAtkins> (Option 3 is indeed extensible to Sass version later, if we want)<br>
&lt;TabAtkins> jensimmons: I agree polls shoudln't dictate us, but given the fact that Option 3's big gotcha is webdevs might get confused, but watching their comments I got a lot of confidence tha toption 3 is the way to go<br>
&lt;bradk> +1 to resolving on option 3 today<br>
&lt;TabAtkins> Rossen_: So I've closed the queue. There's some clear statement of concern raised by Peter, and a clear voice of wanting to adopt 3 and make it work.<br>
&lt;bramus> +1 on moving foward with option 3<br>
&lt;lea> Many people got confused at my polls as well. I think the article did a great job at explaining the options, and no matter what we do, people will get confused anyway.<br>
&lt;lea> +1 on resolving on option 3 today<br>
&lt;TabAtkins> Rossen_: So I'd like to try for a resolution, we'll see if we get a strong objection.<br>
&lt;TabAtkins> plinss: I'm objecting to option 3 as it stands. Okay with trying to refine it further, but don't think it's the right decision as it stands.<br>
&lt;lea> Related to refining option 3 further: https://github.com/w3c/csswg-drafts/issues/7961<br>
&lt;TabAtkins> Rossen_: So to be clear - we want to narrow on Option 3 with options to refine it.<br>
&lt;TabAtkins> Rossen_: [doing a straw poll]<br>
&lt;TabAtkins> Rossen_: Options are 3, 4, or 5 as stated in the poll.<br>
&lt;bradk> 3<br>
&lt;argyle> 3<br>
&lt;flackr> 3<br>
&lt;lea> 3<br>
&lt;TabAtkins> 3<br>
&lt;fantasai> 3<br>
&lt;bramus> 3<br>
&lt;jensimmons> 3<br>
&lt;ntim> 3<br>
&lt;dholbert> 3<br>
&lt;matthieudubet> 3<br>
&lt;miriam> 3<br>
&lt;rachelandrew> 3<br>
&lt;fantasai> Conditional on ; terminating the selector parse<br>
&lt;TabAtkins> It does already do that, yeah<br>
&lt;TabAtkins> (the details are in Syntax)<br>
&lt;lea> q?<br>
&lt;TabAtkins> See https://w3c.github.io/csswg-drafts/css-syntax/#consume-qualified-rule for the ;-termination<br>
&lt;TabAtkins> fantasai: Note that my support is specifically if semicolon terminates the selector parse, so we can extend in the future more safely<br>
&lt;dbaron> how many valid selector beginnings are we accepting if we take option 3?<br>
&lt;fantasai> TabAtkins: Algorithm already terminates on ; if you think you're parsing a selector<br>
&lt;dbaron> (is it more than &amp;, :, and combinator symbols?)<br>
&lt;fantasai> (no, I don't think it is)<br>
&lt;TabAtkins> dbaron, anything other than ident or function is a valid selector beginning, so long as you don't encounter a ; before the {<br>
&lt;chris_> 3<br>
&lt;dbaron> abstain<br>
&lt;nigel> abstain<br>
&lt;astearns> abstain<br>
&lt;jfkthame> abstain<br>
&lt;ydaniv> abstain<br>
&lt;smfr> abstain<br>
&lt;florian> abstain<br>
&lt;Rossen_> abstain<br>
&lt;dbaron> (abstaining because I think we could refine 3, I think)<br>
&lt;nigel> (Having read the comments around the poll, refining 3 seems like the best option)<br>
&lt;bradk> or some people are on call but not paying attention<br>
&lt;TabAtkins> Rossen_: Looks balanced between 3, abstain, and not saying anything, don't think we can resolve on that<br>
&lt;astearns> I think we need an issue on the specific problem of 3 boxing in syntax, with examples and possible ameliorations<br>
&lt;lea> q+<br>
&lt;TabAtkins> Rossen_: Can we leave Option 3 as the only path forward to refine?<br>
&lt;TabAtkins> Rossen_: Peter are you okay with that path forward?<br>
&lt;TabAtkins> plinss: I'm fine with improving our efforts on improving option 3, i'm not okay with excluding any new ideas<br>
&lt;TabAtkins> Rossen_: Right, just want to narrow down to option 3 from the options we have now<br>
&lt;TabAtkins> Rossen_: dbaron, you had an issue?<br>
&lt;TabAtkins> dbaron: Think we're better off working it out in an issue.<br>
&lt;flackr> I think a parser switch would be fine if we had to do it. Could be confusing but developers shouldn't switch back to property syntax after nesting selectors.<br>
&lt;TabAtkins> Rossen_: So we're rejecting Options 4 and 5, and continuing to refine Option 3. Is that a resolution?<br>
&lt;astearns> I disagree with that suggestion, flackr :)<br>
&lt;flackr> :)<br>
&lt;TabAtkins> lea: It looksk like there's a strong sentiment behind option 3 "but refine it", but it seems tha trefining means different things to different people<br>
&lt;TabAtkins> lea: Peter seems to be saying something more - not mixing selectors and decls in the same context.<br>
&lt;TabAtkins> lea: So it might be reasonable to have a lis to fthings we're looking to refine.<br>
&lt;TabAtkins> plinss: to clarify, i'm not fully opposed to mixing selectors and props at all, i just think we need a system that favors a property unless it's explicitly indicated as a selector<br>
&lt;TabAtkins> Rossen_: I want to close down this discussion today. So proposed resolution: narrowing down to Option 3, with continuing improvement before it's accepted<br>
&lt;dbaron> I think plinss's "single mechanism" might be too strong, but I think we could certainly find a different balance of which future syntax goes down the property path versus the selector path without changing any valid-today syntax in option 3.<br>
&lt;TabAtkins> fantasai: Just want some clarity - it seems Peter wants to separate out property/selector syntax with some symbol that indicates "you're now in selector mode" and he wont' accept anything other than that. That's not option 3, it's a previous option we've already considered.<br>
&lt;TabAtkins> fantasai: But OPtion 3 is interweaving mostly freely.<br>
&lt;argyle> option 1 as nesting-1, work out option 3 as nesting-2.. still think that's a valid plan forward<br>
&lt;chris_> we can go back to that previously rejected option if there is new information, yes<br>
&lt;TabAtkins> dbaron: I think one of peter's concerns was the % of stuff that goes down selector vs proeprty path, and where future things that are invalid today will go<br>
&lt;TabAtkins> dbaron: I think we can work out something that puts less stuff down the selector path and more down the property path.<br>
&lt;TabAtkins> fantasai: I think things that are invalid today, both go down the same path - parse until you hit the semicolon then throw it away as invalid.<br>
&lt;TabAtkins> plinss: I'm fine with david's refinement. Don't need a single way to say it's a selector - i'd prefer it, but a few ways will work too.<br>
&lt;TabAtkins> fantasai: Right now the final indicator is a semicolon or a {.<br>
&lt;TabAtkins> fantasai: if you're saying "i want specifically the three symbols" not combinators, that's something else<br>
&lt;TabAtkins> fantasai: If that's the main ojbection we can go back and say you *have* to start the selector with a simple selector<br>
&lt;lea> q?<br>
&lt;TabAtkins> plinss: My problem with that is any random new combiantor we add will hav eto be treated as a selector. It's open-ended, and I want it to not be open-ended. that's the crux of my ojbection.<br>
&lt;TabAtkins> (this was a really long 10min timebox)<br>
&lt;TabAtkins> lea: We're already nearly full on combinators anyway, probably future ones need to be /foo/ or something<br>
&lt;TabAtkins> plinss: We can maybe say "only today's combinators and a slash, nothing else", but I think that's limiting<br>
&lt;fantasai> I agree with that being too limiting<br>
&lt;dbaron> (I think we only have one or two ASCII characters left for combinators anyway.)<br>
&lt;TabAtkins> Rossen_: Ending the topic. I called for objections. Are there any?<br>
&lt;TabAtkins> Rossen_: No objections.<br>
&lt;chris_> \o/ progress!<br>
&lt;TabAtkins> RESOLVED: Reject options 4 and 5, go with option 3 with continuing refinement<br>
</details>


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


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

Received on Wednesday, 21 December 2022 17:46:36 UTC