:root {
--background-color: blue;
}
.box {
background-color: var(--background-color);
}CSS Houdini / notebook
CSS Houdini
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
@property --background-color {
syntax: "<color>";
inherits: false;
initial-value: blue;
}