It drives me nuts how much work we put into making CSS something that it is not. Why are we trying to do scripting with CSS? I can really appreciate the approach taken by React to move style definitions into Javascript, and more specifically into the file of the module whose styles they define.
I'm really just repeating what was said by a Facebook developer (I've forgotten his name at this moment) - but I think it is worth being said: CSS is more a separation of technology, than a separation of concerns. It makes much more sense to have all your code (styles, scripts, markup) in one file for a specific module. Any repeated styles/scripts/markup can be imported as a module.
In hindsight, it makes me wonder what the hell I've been thinking all this time.
I'm really just repeating what was said by a Facebook developer (I've forgotten his name at this moment) - but I think it is worth being said: CSS is more a separation of technology, than a separation of concerns. It makes much more sense to have all your code (styles, scripts, markup) in one file for a specific module. Any repeated styles/scripts/markup can be imported as a module.
In hindsight, it makes me wonder what the hell I've been thinking all this time.