Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is variable scope in CSS?
Variable scope in CSS means where a CSS custom property (variable) can be used or accessed in your styles. It can be global or limited to a specific part of the page.
Click to reveal answer
beginner
How do you declare a CSS variable globally?
You declare a CSS variable globally by defining it inside the :root selector. For example: :root { --main-color: blue; } makes --main-color available everywhere.
Click to reveal answer
intermediate
What happens if you declare the same CSS variable inside a specific selector?
The variable inside the specific selector overrides the global one only within that selector's scope. Outside, the global variable is used.