Problem
I have two scss variables places in colors.scss
file, I want to update the variable colors only from javascript based on a logic,
if(day){
// update $backgroundColor to white
}else{
// update $backgroundColor to black
}
More info:
I have tried :export{}
which is not working and also document.documentElement.style.setProperty
using global css variables. I am using reactjs for frontend development.
classnames
package to help you manage scss classes in you javascript. – Nostalgia