0
0
SASSmarkup~5 mins

Built-in math functions in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
A3
B4
C3.1
DError
Which function rounds a number down to the nearest whole number?
Around()
Bceil()
Cfloor()
Dabs()
What does abs(-7) return?
A7
BError
C0
D-7
How does percentage(0.25) evaluate?
A0.25%
B250%
C2.5%
D25%
Which function returns the largest number from a list?
Amax()
Bmin()
Cabs()
Dfloor()
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.