calc()
noun
say it: “KALK” /kælk/
A CSS function that works out a size with math, and can mix units, such as 100% minus 250px.
What does calc() do?
calc() does math in CSS, even mixing units, like "the full width minus the sidebar".
.main { width: calc(100% - 250px); } /* room left beside a 250px sidebar */
In a sentence
- “The main column is calc() of 100% minus 250px, so it takes whatever room the sidebar leaves.”
Level: Freelancer · More CSS terms at this level
Updated