by tannhaeuser · 4y ago · 0 comments
I mean even one of the long-term editors of the CSS spec has raised hands and warned against including ever more inessential and author-oriented features [1]. That was almost 14 years ago.
Nesting is way overdue. But of course we shouldn’t be discussing it at Google’s site.
But true support is convenient. One of the best places to write CSS is the browser’s dev tools. Having CSS variables work there is awesome.
If it can be parsed almost as fast, I say go for it.
CSS nesting is clearly serving the use case of components in web apps, as opposed to mere content-driven web sites. IMO a sensible approach would be to give web app developers powerful ways to tie into rendering and layout programmatically (a la Houdini API) when those apps will require JavaScript, and in many cases use CSS-in-JS anyway, rather than burden browser cores with ever more questionable CSS features.
"Would solve 99% of use cases" also sounds like famous last words ;)
It’s not scoping in the inheritance sense. The C in CSS is for cascading. Inheriting is the natural way to be for CSS
It does have the ability to be a foot-shotgun, but so do 3/4s of the features in CSS if you don't understand them. And people that want it would probably just do the same thing in SCSS anyways.
regrettably reminiscent of the Wikimedia Foundation
Now that's a page that can be dated by its look.
> - Half the files is less then 7 lines. > - 90% is less than 163 lines. > - Only 0.6% is longer than 500 lines.
This part jumped out at me. Those were the days...
So a better question is why shouldn't the tool be necessary? It's all about writing the same CSS in a more developer-friendly way, not enabling CSS to do something it never could before (like variables and flex did). Why should browsers have to worry about this added complexity? Just write your stylesheets however you'd like, and then run a tool to compile them down to standard CSS.