CSS Custom Properties (CSS Variables)

Wishlist Share

About Course

CSS custom properties, often called CSS variables, let you store values such as colours and spacing once and reuse them across a stylesheet. Learn how to declare them, use var() with fallbacks, take advantage of inheritance for themes such as dark mode, update them from JavaScript and register typed properties with @property.

Tutwoo is an independent learning provider. This course is written from the official documentation listed in the sources, which can change, so always check the current documentation for the version you use. It is not endorsed by any of the organisations listed and is not an accredited qualification.

© 2026 Tutwoo UK Limited. This course was created in-house by Tutwoo and is our original work. It is for your own learning only: please do not copy, share, record or resell it.

What Will You Learn?

  • Declare custom properties on :root and in components
  • Use var() with fallback values correctly
  • Build light and dark themes using inheritance and the cascade
  • Read and set custom properties in JavaScript and register them with @property

Course Content

Course Lessons

  • Declaring and using custom properties
  • Fallbacks and invalid values
  • Inheritance, the cascade and theming
  • JavaScript and @property

Sources & Further Reading
The official guidance this course is based on.

Final Assessment

Student Ratings & Reviews

No Review Yet
No Review Yet

Want to receive push notifications for all major on-site activities?

✕