Recall & Review
beginner
What are the main number types used in Sass?
Sass mainly uses two number types: unitless numbers (like 5, 10) and numbers with units (like 5px, 2em, 50%).
Click to reveal answer
intermediate
How does Sass handle arithmetic with different units?
Sass can add, subtract, multiply, and divide numbers with units if the units are compatible. For example, you can add 10px + 5px, but not 10px + 5em without conversion.
Click to reveal answer
beginner
What happens if you multiply a number with a unit by a unitless number in Sass?
The unit stays the same. For example, 5px * 2 results in 10px. The unitless number scales the value but does not change the unit.
Click to reveal answer
beginner
Name some common CSS units that Sass supports.
Common units include px (pixels), em (relative to font size), rem (root font size), % (percentage), vh and vw (viewport height and width).
Click to reveal answer
intermediate
Can Sass convert between different units automatically?
No, Sass does not convert units automatically. You must manually convert units or use functions to handle unit conversions.
Click to reveal answer
Which of these is a unitless number in Sass?
✗ Incorrect
Only '10' has no unit, so it is unitless.
What is the result of 5px * 3 in Sass?
✗ Incorrect
Multiplying a number with a unit by a unitless number keeps the unit: 5px * 3 = 15px.
Can you add 10px + 5em directly in Sass?
✗ Incorrect
Sass requires compatible units to add numbers directly.
Which unit represents a percentage in Sass?
✗ Incorrect
The '%' symbol is used for percentages.
Does Sass automatically convert 1in to 96px?
✗ Incorrect
Sass does not convert units automatically; you must convert manually.
Explain the difference between unitless numbers and numbers with units in Sass.
Think about how Sass treats plain numbers versus numbers with px, em, %.
You got /4 concepts.
Describe how Sass handles arithmetic operations involving units.
Consider what happens when you add 10px + 5px versus 10px + 5em.
You got /4 concepts.