Calc
Calculated attributes
You need to wrap calculated values in []
.
py-[3-2]
Rules
Do not put space in calculations formula.
The calculation should use fixed values:
"h-[calc(100vh-3.5rem)]"
Using Template Literals
When using template literal, you also need to wrap it in []
and ${}
syntax:
py-[${topMenuBarHalfHeightPx}]