CSS Variables - An introduction to CSS custom properties

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

BeginnerUI12 min

About this video

An introduction to CSS variables, also called CSS custom properties, covering what they are, why they are useful, and how to write and use them. It is the first part of a series, aimed at people who know CSS and may have used Sass variables.

What you’ll learn

  • Declare a CSS custom property and set its value
  • Use var() to reuse values across a stylesheet
  • Compare CSS variables with Sass variables