Live data from Hacker News

Help choose the syntax for CSS Nesting

webkit.org

1–10 of 170 posts

Re: Help choose the syntax for CSS Nesting

#5
> Everyone wishes CSS nesting could use the same kind of simple syntax that Sass does. That’s impossible, however, because of the way browser parsing engines work.

I wish browser vendors could work around this limitation and stick to Sass syntax. IMHO all of those options seems strange and make it difficult to read.

Re: Help choose the syntax for CSS Nesting

#6
post #4

Wasn't this already asked by Chrome developers? Or each browser is implementing nesting in their own way?

If you open the article you will find this as the 4th paragraph:

> So, a lengthy discussion began about what to do instead. Earlier this summer, the CSSWG debated between Option 1, Option 2 and Option 3. Of those, Option 3 won. Since then, two more options have been proposed, Option 4 and Option 5. If you remember various details discussed across 53+ issues, put all of those older ideas aside. At this point, we are only debating between Option 3, 4 and 5, as described in this article through the set of examples below.

Re: Help choose the syntax for CSS Nesting

#7
Option 3 seems the most intuitive, but I can see the arguments for 5. It's 4 that I'm having a hard time understanding why anyone would want it that way. It's truly awful. I can't think of literally any other language (style, markup, programming, or otherwise) that does nesting with a second set of adjacent (not nested!) curly braces.
Post reply on HN