I am trying to use less.js to make changes to a smaller stylesheet for demo purposes. I would like this to be done, it is to remember the previous changes, so I need to send only one change for efficiency. Say I have the following:
@PrimaryColor:
If I change one parameter, it works fine.
less.modifyVars({ "@PrimaryColor": "#ff0000" });
Now the colors are as follows:
@PrimaryColor:
Now, if I call the method again:
less.modifyVars({ "@SecondaryColor": "#00ff00" });
The primary color switches back and the secondary color changes:
@PrimaryColor:
My question is, is there a method or method that will simply change one parameter and leave the other changes alone?
javascript css less
uadrive
source share