Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Introducing "CSS Custom Properties for Cascading Variables" 2:24
- Declaring and Using CSS Variables 9:46
- CSS Variables vs. Preprocessor Variables 5:28
- Cascade and Inheritance with CSS Variables 5:30
- Providing Fallbacks and Building Length Values 3:00
- Using CSS Variables with SVG 3:33
- Updating CSS Variables with JavaScript 6:41
- Best Practices and Tips 1:02
Start a free Courses trial
to watch this video
![](https://videos.teamtreehouse.com/stills/TH-WS-CSSVariables-V2-stills-4.jpg?token=69950f72_5525357d2964380ddabe839c3b919ce2b6ccfe6a)
- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Using CSS variables in your stylesheet is a two-step process. First, you declare the variable inside a selector using custom property notation. Then you reference the variable (or custom property name) using the CSS var()
function.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Ming Chi Wong
2,909 Points1 Answer
-
Mustafa Khan
6,224 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up