0
0
SASSmarkup~20 mins

Why design systems need SASS - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
SASS Design System Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why use variables in SASS for design systems?
What is the main benefit of using variables in SASS when building a design system?
AThey make the website load faster by compressing CSS.
BThey allow consistent reuse of colors and fonts across the entire system.
CThey replace the need for CSS selectors entirely.
DThey automatically generate HTML elements for the design system.
Attempts:
2 left
💡 Hint
Think about how design systems keep styles uniform across many pages.
📝 Syntax
intermediate
2:00remaining
What does this SASS code output in CSS?
Given the SASS code below, what is the compiled CSS output?
SASS
$primary-color: #3498db;
.button {
  background-color: $primary-color;
  color: white;
}
A
.button {
  background-color: blue;
  color: white;
}
B
.button {
  background-color: $primary-color;
  color: white;
}
C
.button {
  background-color: #3498db;
  color: white;
}
DSyntaxError: Undefined variable $primary-color
Attempts:
2 left
💡 Hint
SASS variables are replaced with their values during compilation.
selector
advanced
2:00remaining
Which SASS selector nesting produces this CSS?
Which SASS code will compile to the following CSS? .button { color: white; } .button:hover { color: black; }
A
.button {
  color: white;
  &:hover {
    color: black;
  }
}
B
.button {
  color: white;
}
&:hover {
  color: black;
}
C
.button {
  color: white;
  .hover {
    color: black;
  }
}
D
.button {
  color: white;
  :hover {
    color: black;
  }
}
Attempts:
2 left
💡 Hint
Look for the correct way to nest pseudo-classes in SASS.
layout
advanced
2:00remaining
How does SASS help manage complex layouts in design systems?
Which SASS feature best helps organize and reuse layout styles in a design system?
AMixins that group layout rules to reuse in multiple places.
BVariables that store pixel values for margins only.
CFunctions that generate random colors for backgrounds.
DDirect HTML editing inside SASS files.
Attempts:
2 left
💡 Hint
Think about how to reuse groups of CSS rules easily.
accessibility
expert
3:00remaining
How can SASS improve accessibility in design systems?
Which SASS approach helps maintain accessible color contrast across a design system?
AHardcoding all colors as fixed hex values without changes.
BAvoiding variables and writing all styles inline.
CUsing only black and white colors for all elements.
DUsing functions to calculate and adjust color brightness for contrast.
Attempts:
2 left
💡 Hint
Accessibility needs good contrast between text and backgrounds.