Skip to content
UPEEC

Custom Properties (CSS Variables)

Reusable values defined with `--name` and read with `var()`; they cascade and can change at run time.

Easy
Comments 0
:root { --brand: #f5b301; --ink: #1f2731; }
.button { background: var(--brand); color: var(--ink); }

The foundation of themes and dark mode.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.