hey guys, I really want the same scenario described here, is this the best practice for it?

Stack Overflow
Switch the sass class based on javascript condition
I have a web portal for two different countries. Each country has different UX(small css changes like padding, color, font) design. There are more countries in line. I would like to say the countr...
2 Replies
MarkBoots
MarkBoots2y ago
yea, that answers seems correct. you cant change sass, it is already compiled to regular css in the client. There are different options to change styling in css with js, like: - add inline styling to the elements - add a specific class / id / data-attribute which you can target with css - set custom properties on an element which are used in the css it all depends on what you exactly need/want
Kevin Powell
Kevin Powell2y ago
Sounds like what you are looking for are CSS custom properties, instead of Sass variables