var()

noun

say it: “VAR” /vɑːr/

The CSS function that reads a custom property's value, such as var(--brand), with an optional backup value after a comma.

What does var() do?

var() reads the value of a custom property.

.card { padding: var(--space-md); }

In a sentence

  • “Inside the button rule, var() reads --brand, so the button turns the shop's green.”

Level: Freelancer · More CSS terms at this level

Updated