How to Get and Set CSS Variable Values with JavaScript
David Walsh
OCTOBER 8, 2018
CSS variables are a very welcome addition to the language, despite them being incredibly basic. Sure we could use SASS or stylus but languages should never count on developers relying on frameworks and toolkits to accomplish what we know we need. And just like every other part of a webpage, you can get and manipulate CSS variable values — let’s check out how!
Let's personalize your content