Remix.run Logo
mmastrac 4 days ago

EDIT: the nested selector popped up without me noticing; removing my comment because I was working from faulty information (and clearly was missing from the blog post)

marcosdumay 4 days ago | parent | next [-]

We have had nested style rules in native CSS for a couple of years already.

https://developer.mozilla.org/en-US/docs/Web/CSS/Nesting_sel...

mmastrac 4 days ago | parent [-]

Thanks! I legitimately missed this not having done intensive CSS work for a few years. Odd that it doesn't appear much in blog posts. I suppose the patterns are still being worked out?

lemonberry 4 days ago | parent | prev | next [-]

Sorry if you know about this, I can't tell from your post. But nesting CSS has been added. Here's the MDN article: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting

Browser support is here: https://caniuse.com/?search=nesting

quotemstr 4 days ago | parent [-]

Impugning CSS and not knowing that nested selectors work fine everywhere is just perfect example of what I'm discussing here: https://news.ycombinator.com/item?id=44876345

nvch 4 days ago | parent | prev | next [-]

Didn't they do it? https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting...

ale 4 days ago | parent | prev [-]

BEM is a naming convention and SCSS is a preprocessor, they're completely different things.