Hi,
Thanks for reading. css module library has its limitations. Some things fit nicely into the css modules design, for example, tip #7 that lets you set :global selectors under you component selector. It also lets you handle nesting in .scss by flatting their names when exporting them as a javascript object. But since it must flat the list of selectors, you "lose" some flexibility and some features.
I recommend you to give css-in-js a try, I'm using it in large scale projects and can do everything you mentioned and even more because you can use javascript to perform calculations or manage a theme at runtime.
Thanks Again :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi,
Thanks for reading. css module library has its limitations. Some things fit nicely into the css modules design, for example, tip #7 that lets you set
:global
selectors under you component selector. It also lets you handle nesting in.scss
by flatting their names when exporting them as a javascript object. But since it must flat the list of selectors, you "lose" some flexibility and some features.I recommend you to give css-in-js a try, I'm using it in large scale projects and can do everything you mentioned and even more because you can use javascript to perform calculations or manage a theme at runtime.
Thanks Again :)