0
0
SASSmarkup~5 mins

Arithmetic operations in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are arithmetic operations in Sass?
Arithmetic operations in Sass are calculations like addition (+), subtraction (-), multiplication (*), division (/), and modulo (%) used to compute values for styles.
Click to reveal answer
beginner
How do you add two numbers in Sass?
You use the plus sign (+). For example: $total: 10 + 5; sets $total to 15.
Click to reveal answer
beginner
What happens if you divide two numbers in Sass?
Sass divides the numbers and returns the result. For example, $result: 20 / 4; sets $result to 5.
Click to reveal answer
intermediate
Can you use arithmetic operations with units in Sass? Give an example.
Yes, you can. For example, $width: 100px / 2; results in 50px. Sass keeps the unit when dividing or multiplying.
Click to reveal answer
intermediate
What is the modulo (%) operation in Sass?
Modulo (%) gives the remainder of division. For example, 7 % 3 equals 1 because 3 goes into 7 twice with 1 left over.
Click to reveal answer
Which symbol is used for multiplication in Sass arithmetic?
A*
B-
C+
D/
What will $result: 15 - 5; set $result to?
A5
B20
C10
D0
If $size: 50px / 5;, what is the value of $size?
A10px
B5px
C250px
D10
What does the modulo operator (%) return?
AThe quotient of division
BThe sum of two numbers
CThe product of two numbers
DThe remainder of division
Which of these is NOT a valid arithmetic operator in Sass?
A+
B&
C*
D/
Explain how you can use arithmetic operations in Sass to calculate widths with units.
Think about how Sass handles units when you multiply or divide numbers.
You got /6 concepts.
    Describe the modulo operation and give a simple example of when it might be useful in Sass.
    Modulo helps find leftovers after dividing numbers.
    You got /4 concepts.