DEV Community

Discussion on: CSS Custom Properties (vars) with SASS/SCSS, a practical architecture strategy

 
felipperegazio profile image
Felippe Regazio

ah yah! that makes total sense. there are some ways to overcome this problem, i think my choice would be:

declare an outer scope sass var that defines a section/file css var prefix. that var can also be overrided, so in the header, main file or config file of any module that you want, you can set yoru prefix once, than all the cssvar functions will readit. this has some flaws also in a manner that you will have to pay attention in how to set your module $prefix in a cascade style.

would be something like: