jargon

Frontend & browser·Layout, CSS and the cascade

you change one value on the root element and a theme's worth of colours updates without a rebuild.

Custom property

Also calledCSS variable, --custom-property

A user-defined property, written `--name`, that inherits down the tree and is read back with `var()`. Unlike a preprocessor variable it exists at runtime, so it can be changed by a media query, a class, or JavaScript, and it is what makes a theme switch possible without shipping two stylesheets. The costs are that it is a string until used, so mistakes fail silently to the fallback, and that changing one high in the tree invalidates styles for everything below.

Commonly confused with