0
0
SASSmarkup~5 mins

Spacing utility generation in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
A@if
B@each
C@import
D@mixin
What does the class .p-3 usually represent in spacing utilities?
APadding with size 3
BMargin with size 3
CPosition fixed
DPadding with size 0.3rem
Why use Sass variables for spacing values?
ATo write inline styles
BTo make CSS slower
CTo avoid using loops
DTo reuse and update spacing sizes easily
Which CSS property adds space inside an element between content and border?
Apadding
Bmargin
Cborder-spacing
Dgap
What is a benefit of generating spacing utilities with Sass loops?
ASlower page load
BMore manual CSS writing
CLess repetitive code and consistent spacing classes
DNo need for variables
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.