- url()
- calc()
- rgb/rgba()
- hsl/hsla()
- linear/radial-gradient()
- counter()
- attr()
- scale()/rotate()/translate()
calc()
- Mozilla Developer Network (MDN)
calc() supports +, -, /, * operators
you need whitespace around the + and - operators. Without that it's considered invalid syntax.
Why? CSS Variables Forward Compatibility
calc( calc(20px / 2) / 4) /* becomes... */
calc( (20px / 2) / 4) = 2.5px
CSS variables can be used to make this look simpler.
--calcA : calc(20px / 2);
--calcB : calc( var(--calcA) / 4);