3 ms·
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 blo
by mmastrac 1y 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 1y agoWe have had nested style rules in native CSS for a couple of years already. https://developer.mozilla.org/en-US/docs/Web/CSS/Nesting_selector https://developer.mozilla.org/en-US/docs/Web/CSS/Nesting_sel...
- mmastrac 1y agoThanks! 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 1y agoSorry 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 https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting Browser support is here: https://caniuse.com/?search=nesting https://caniuse.com/?search=nesting
- quotemstr 1y agoImpugning 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 https://news.ycombinator.com/item?id=44876345
- nvch 1y agoDidn't they do it? https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting/Using_CSS_nesting https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting...
- ale 1y agoBEM is a naming convention and SCSS is a preprocessor, they're completely different things.