Recall & Review
beginner
What is the purpose of spacing utilities in CSS?
Spacing utilities help quickly add consistent margin or padding to elements without writing custom CSS each time.
Click to reveal answer
beginner
How can Sass variables improve spacing utility generation?
Sass variables store spacing values so you can reuse and update them easily across all utilities.
Click to reveal answer
intermediate
What Sass feature allows you to create multiple spacing classes from a list of values?
Using Sass loops like @each lets you generate many classes dynamically from a list or map of spacing sizes.
Click to reveal answer
beginner
Explain the difference between margin and padding utilities.
Margin utilities add space outside an element, separating it from others. Padding utilities add space inside an element, between content and border.
Click to reveal answer
intermediate
Why is it important to use semantic class names for spacing utilities?Semantic class names like .m-1 or .p-2 clearly describe the spacing type and size, making code easier to read and maintain.Click to reveal answer
Which Sass directive is best for generating multiple spacing utility classes from a list?
✗ Incorrect
@each loops through lists or maps to create multiple classes efficiently.
What does the class .p-3 usually represent in spacing utilities?
✗ Incorrect
.p-3 means padding of size 3 units (defined by your spacing scale).
Why use Sass variables for spacing values?
✗ Incorrect
Variables let you change spacing in one place and update all utilities automatically.
Which CSS property adds space inside an element between content and border?
✗ Incorrect
Padding adds space inside the element around its content.
What is a benefit of generating spacing utilities with Sass loops?
✗ Incorrect
Loops automate class creation, saving time and ensuring consistency.
Describe how you would create a set of margin utilities using Sass.
Think about how to reuse values and loop through them.
You got /3 concepts.
Explain the difference between margin and padding and why both are important in spacing utilities.
Consider how spacing affects element separation and content spacing.
You got /4 concepts.