Recall & Review
beginner
What does the
abs() function do in Sass?The
abs() function returns the absolute value of a number, which means it removes any negative sign and gives the positive value.Click to reveal answer
beginner
How does the
ceil() function work in Sass?The
ceil() function rounds a number up to the nearest whole number. For example, ceil(4.2) becomes 5.Click to reveal answer
intermediate
Explain the difference between
floor() and round() in Sass.floor() rounds a number down to the nearest whole number, while round() rounds a number to the nearest whole number based on normal rounding rules (up if decimal ≥ 0.5, down otherwise).Click to reveal answer
beginner
What does the
percentage() function do in Sass?The
percentage() function converts a decimal number to a percentage by multiplying it by 100 and adding the % unit. For example, percentage(0.5) returns 50%.Click to reveal answer
intermediate
How can you use the
min() and max() functions in Sass?The
min() function returns the smallest number from a list of numbers, and max() returns the largest. They help pick limits or boundaries in styles.Click to reveal answer
What will
ceil(3.1) return in Sass?✗ Incorrect
ceil() rounds up to the nearest whole number, so 3.1 becomes 4.Which function rounds a number down to the nearest whole number?
✗ Incorrect
floor() always rounds down to the nearest whole number.What does
abs(-7) return?✗ Incorrect
abs() returns the positive value, so -7 becomes 7.How does
percentage(0.25) evaluate?✗ Incorrect
percentage() multiplies by 100 and adds %, so 0.25 becomes 25%.Which function returns the largest number from a list?
✗ Incorrect
max() returns the largest number from the given list.Describe how you would use Sass built-in math functions to control layout spacing.
Think about rounding sizes and limiting values.
You got /5 concepts.
Explain the difference between
round(), ceil(), and floor() in Sass with examples.Consider how each function treats decimal numbers.
You got /5 concepts.