Challenge - 5 Problems
SASS Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
What problem does SASS variables solve in CSS?
CSS does not support variables natively in older versions. What limitation does SASS variables help overcome?
Attempts:
2 left
💡 Hint
Think about how you can avoid repeating the same color code many times.
✗ Incorrect
SASS variables let you store values like colors or font sizes once and reuse them everywhere. This makes changing styles easier and reduces mistakes.
📝 Syntax
intermediate2:00remaining
Which SASS code correctly nests CSS selectors?
Nesting selectors is a feature SASS adds to CSS. Which option shows correct nesting syntax in SASS?
Attempts:
2 left
💡 Hint
Look for curly braces inside curly braces.
✗ Incorrect
SASS allows nesting selectors inside others using curly braces. This keeps related styles grouped and easier to read.
❓ selector
advanced2:00remaining
What is the output CSS of this SASS code with parent selector &?
Given this SASS code, what CSS does it produce?
button {
&.active {
color: red;
}
}SASS
button {
&.active {
color: red;
}
}Attempts:
2 left
💡 Hint
The & symbol means the parent selector itself.
✗ Incorrect
The & symbol in SASS means 'use the parent selector here'. So &.active becomes button.active in CSS.
❓ layout
advanced2:00remaining
How does SASS mixins improve CSS layout code?
Which option best describes how SASS mixins help with layout styles?
Attempts:
2 left
💡 Hint
Think about repeating the same layout styles in many places.
✗ Incorrect
Mixins let you write a group of CSS rules once and reuse them wherever needed. This is great for layouts like flexbox or grid that repeat often.
❓ accessibility
expert3:00remaining
How can SASS help maintain accessible color contrast?
Which SASS feature helps ensure color contrast stays accessible when changing theme colors?
Attempts:
2 left
💡 Hint
Think about how to check if text color is readable on a background color.
✗ Incorrect
SASS functions can calculate color brightness or contrast ratios. This lets you write code that changes text color based on background color to keep it readable.