<calc()> = calc( <calc-sum> )
<calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*
<calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*
<calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> )
For calc()
, white space is required around the "-
" and "+
" operators, but not the "*
" or "/
" operators.
All units must be of the same type; trying to multiply a height by a time duration, for example, is invalid.