DEV Community

loading...

Reading Snippets [52 => CSS] 🎨

Calvin
Passionate about building products that people love.
・1 min read

Calc() can be used in CSS to perform math operations on values.

It can be used for performing different calculations, including adding and subtracting values, using percentages.

For example:

div {
max-width: calc(80% - 100px)
}

Flavio Copes,The CSS Handbook

Discussion (0)