Closed steadicat closed 7 years ago
I feel this was a mistake, you could have easily added a global.css and imported it in index.html
why allow a random component declare a global?
Many projects have a CSS pipeline (with variables, autoprefixing, etc.), which makes it impossible to simply add a CSS file to the HTML page. The CSS needs to be preprocessed, which would mean creating and maintaining a whole separate CSS pipeline for what might just be a few rules. If you don't like this feature you're free to not use it in your projects.
It would be great if it were an escape hatch that would allow you to specify global style rules in JS as well, without having to use a separate syntax and pipeline for it.
There could be a special syntax that would opt a rule out of the selector rewriting. For example:
This would inject the following into the generated stylesheet: