css-modules / css-modules

Documentation about css-modules
17.68k stars 558 forks source link

Question | How to map SCSS variables, mix-ins and classes etc to CSS modules in best possible way #304

Open vinodloha opened 6 years ago

vinodloha commented 6 years ago

Hi Folks,

I have a use-case of depending on legacy SCSS based living style guide in my new react application (primarily for maintaining single source of theme across applications). Please suggest best possible way to consume these SCSS definitions like variables, mixin, classes etc into css modules.

Thanks.

Download commented 5 years ago

What I am doing is I have configured sass-loader in my Webpack loader chain in front of CSS loader. Sass loader turns the sass into css and then CSS loader picks it up as usual.

marcemira commented 5 years ago

What'd be a solution for non Webpack setups? Thanks