sass Operators Arithmetic Operators


Example

Sass supports the following standard arithmetic operators:

OperatorDescription
+Addition
Subtraction
*Multiplication
/Division
%Remainder

Examples

p {
    font-size: 16px + 4px; // 20px
}
h3 {
    width: 2px * 5 + 12px; // 22px
}
h2 {
    width: 8px + (12px / 2) * 3; // 26px
}

Normal order of operations applies as usual.