2 ms·
> Nested rules is just a syntax sugar. But this syntax can also be used in minified CSS. I'm sure minifiers will have a fun time with this in 5 years when most
by LoganDark 4y ago
> Nested rules is just a syntax sugar.
But this syntax can also be used in minified CSS. I'm sure minifiers will have a fun time with this in 5 years when most of the major browsers support it.
I've seen all sorts of examples of stylesheets that would benefit from this, Tailwind Typography being a good one because it styles all sorts of nested elements but only inside of `.prose`. Eliminating tens or hundreds of `.prose` selectors by wrapping them all in a single `.prose { }` would make it smaller; not sure exactly how much smaller though.
This sounds like a fun case study.