How to use global variables in CSS-Modules?

前端 未结 4 2163
猫巷女王i
猫巷女王i 2021-02-13 13:24

I\'m busy learning React with CSS-Modules and I don\'t quite understand how one would store variables? For example, in Sass you\'re able to do this:

// _variable         


        
4条回答
  •  清歌不尽
    2021-02-13 13:39

    You may use sass preprocessor and sass-resources-loader.

    sass-resources-loader will add all your variables, mixins, etc into each required sass file.

提交回复
热议问题