[HN Gopher] Help choose the syntax for CSS Nesting
___________________________________________________________________
Help choose the syntax for CSS Nesting
Author : feross
Score : 13 points
Date : 2022-12-15 22:19 UTC (42 minutes ago)
(HTM) web link (webkit.org)
(TXT) w3m dump (webkit.org)
| butz wrote:
| Wasn't this already asked by Chrome developers? Or each browser
| is implementing nesting in their own way?
| FinnLeSueur wrote:
| 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.
| slinger wrote:
| > 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.
| photoGrant wrote:
| Embedded braces, no question!
| LordDragonfang wrote:
| 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.
| sublinear wrote:
| All these options are pretty terrible yeah. I'd prefer if there
| was work done towards selectors for parent items, siblings of
| parents, and children of parent siblings. Not that the work is
| mutually exclusive.
| martin_a wrote:
| Do we really need this?
|
| I find all the examples harder to read and understand than
| combining classes/elements.
| gorkish wrote:
| We want it to work the way Sass works. FFS make it happen and
| stop it with all this pedantry.
| spankalee wrote:
| Did you read the third paragraph in the article?
___________________________________________________________________
(page generated 2022-12-15 23:01 UTC)