6. CSS calc function #

Created Wednesday 03 November 2021

Why #

Allows calculations in CSS, for different length units.

How #

Syntax: selector{ font-size: calc(32px + 10vm); width: calc(100px + var(–oldwidth)); }

NOTE: Addition and subtraction need whitespace between operators. 🛑️

Applications of calc #