I remember learning CSS in the early 2000s, with the book showing how one could have separate stylesheets for on screen display vs printing. You’d think this approach would have aged nicely, now that websites need to render on a large variety of screen densities/sizes/aspect ratios/etc. Well no, now we have huge bloated CSS files full of media queries and weird things that are impossible to make sense of unless you’ve spent a few weeks in the codebase.
So yes, nice in theory but completely outdated in practice given the horrible Beast DOM has become.
Perhaps that approach was too idealistic all along, and only sort of worked in the beginning, when the web was really basic and most people were on a 1024x768 display. The form is the function and also the medium and the message, and it’s impossible to place abstract boundaries on where the content vs presentation vs interaction lie.
It is about those things not being entangled as spaghetti with each other.
Reacts Philosophy is that everybody's css/js/html is tightly coupled and therefor using different languages with different semantics and scoping rules increase the cognitive complexity without providing any advantage.
Can I break your app by just touching the CSS? Does any cosmetic change at any point require that I touch the html? Can I write a new style sheet for your app without knowing the JS or HTML? Can I plug in a new style sheet of one application into another? Can people work on the JS/HTML/CSS separately and independently?
Putting your spaghetti in separate folders doesn't make it less spaghetti.
And the market knows it's tightly coupled spaghetti for everyone. Thats why you don't see different job adverts for your three different folders.
The goal was to have a world where the designer would know CSS but zero JavaScript and zero HTML. This goal has completely failed.
I think that semantic design/development is hard and that's why people end up with jumbled messes of things. Commenting code is hard too, that's why most developers don't do it. We're not here because the DOM is crazy. We're here because the DOM is crazy and developers are too lazy/taxed/forced to do it the quick and dirty way instead of the way that works ideologically and is generally accepted as a best practice.
I agree that this is a realist vs. an idealist discussion, though. It's a very mild version of the gun control argument - the idealist in me thinks nobody should need guns, the realist in me realizes that people should be able to have them.
That being said, variables are useful. I have no problem using variables in a CSS preprocessor and don't really care one way or the other whether it's included in the CSS spec.