0
0
SASSmarkup~20 mins

CSS limitations that SASS solves - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
SASS Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2: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?
AThey allow reusing values like colors and sizes throughout the stylesheet easily.
BThey enable CSS to run JavaScript code inside stylesheets.
CThey automatically fix broken CSS selectors.
DThey convert CSS into HTML automatically.
Attempts:
2 left
💡 Hint
Think about how you can avoid repeating the same color code many times.
📝 Syntax
intermediate
2: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?
A
nav {
  ul
    margin: 0;
  }
}
B
nav > ul {
  margin: 0;
}
C
nav {
  ul {
    margin: 0;
  }
}
D
nav {
  ul: {
    margin: 0;
  }
}
Attempts:
2 left
💡 Hint
Look for curly braces inside curly braces.
selector
advanced
2: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;
  }
}
A
button.active {
  color: red;
}
B
.active button {
  color: red;
}
C
button .active {
  color: red;
}
D
button > .active {
  color: red;
}
Attempts:
2 left
💡 Hint
The & symbol means the parent selector itself.
layout
advanced
2:00remaining
How does SASS mixins improve CSS layout code?
Which option best describes how SASS mixins help with layout styles?
AMixins remove the need for media queries in CSS.
BMixins automatically create responsive grids without any code.
CMixins convert CSS into JavaScript functions for layout.
DMixins let you write reusable blocks of CSS that can include layout properties like flexbox settings.
Attempts:
2 left
💡 Hint
Think about repeating the same layout styles in many places.
accessibility
expert
3:00remaining
How can SASS help maintain accessible color contrast?
Which SASS feature helps ensure color contrast stays accessible when changing theme colors?
AUsing nesting to group unrelated styles.
BUsing functions to calculate color brightness and adjust text color automatically.
CUsing variables only for font sizes.
DUsing mixins to hide content visually.
Attempts:
2 left
💡 Hint
Think about how to check if text color is readable on a background color.