How To Use Native CSS Variables

In this video, I’ll show you how to use CSS custom properties or variables. Then I’ll show how you can access the variable values in JavaScript, and how to change the values in JavaScript.


Intro: 0:00
Basic Example: 1:02
Getting CSS Variable Value In JavaScript: 5:19
Setting a CSS Variable in JavaScript: 7:24


Custom Variables Documentation from MDN 👉🏾

document.documentElement documentation from MDN 👉🏾