New course! Every coder should learn Generative AI!
Try a free lesson+ 7
You can use JavaScript to change CSS values indirectly through CSS variables.
https://code.sololearn.com/Wa725Y80c5ps/?ref=app
+ 5
Yes it's possible but not possible in css file.
You can get the element(s) and use javascript to change the style
+ 5
You can't call JS variables into css file because css is not a programming language It is just a style sheet language.
A better question is: what you are trying to do? let us help you!
+ 3
As Simple As This:
var bg='blue';
element.style.backgroundColor=bg;