CSS Variables - manipulating them with JavaScript

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI11 min

About this video

Shows how to update CSS custom properties dynamically with JavaScript so interface values can change on the fly. It assumes a basic understanding of CSS variables.

What you’ll learn

  • Update CSS custom properties from JavaScript
  • Change interface styles on the fly without editing the stylesheet