CSS Variables - Using them in the real world and a cool trick

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

IntermediateUI8 min

About this video

Shows how CSS variables let you organise a site's styles in one place and change a colour across a section with a single line of CSS. Aimed at people who already write some CSS.

What you’ll learn

  • Define and reuse CSS custom properties in one place
  • Override a variable to restyle one part of a page
  • Organise site colours and values with CSS variables