Re: [csswg-drafts] [css-nesting-1] Can we relax the syntax further? (#7961)

@sesse 

> since we'd need to remove some optimizations that have been said to yield approximately that.

More details would be helpful here. What kind of optimizations? Why would you need to remove them? For which approach of the ones discussed would you need to remove them? 

> I don't share this goal; I would like us to just get the syntax (any syntax) specified, out the door and be done with it. So no, I won't be spending resources trying to bend our minds around how we tokenize CSS to this avail; I can NAK what is a non-starter for us, and that's what you'll get.

That’s …not a great attitude. 😕 We definitely don’t want to get "any syntax" out the door and be done with it, this is something that millions of developers will be using all over their stylesheets. It *matters* to get it right. 

---

@Loirooriol 

> Regardless of whether implementations are willing accept the performance impact, this would also make it more difficult for authors to know whether something is a style declaration or a nested rule in edge cases, thus making the language more messy. I don't like this at all.

This is about dropping the requirement of an explicit `& ` in front of **descendant selectors that start with an element selector**. We have already resolved to make it optional in all _other_ cases in #7834, so not sure how making it optional in all cases makes the language messier, if anything not having this exception makes it *less* messy. This is exactly the syntax nested rules would have in Option 4, which [I see you voted you prefer](https://github.com/w3c/csswg-drafts/blob/main/css-nesting-1/proposals.md#discussion-participant-positions) over the now current (option 3) syntax. The ability to write selectors like this is the main reason people are considering option 4, so if we could get the same syntax *and* actually nest, it seems the best of both worlds.

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7961#issuecomment-1293904534 using your GitHub account


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

Received on Thursday, 27 October 2022 18:23:35 UTC