CSS Variable
A CSS custom property, often called a CSS variable, is an author-defined property whose value can be reused with the var() function.
Custom properties participate in the cascade and inheritance, which makes them useful for design tokens, component theming and responsive values.
Reusable values that still participate in CSS
Custom properties participate in the cascade and inheritance, which makes them useful for design tokens, component theming and responsive values. In practical terms, CSS Variable belongs to the presentation and layout layer. Knowing that layer is important because it tells you what the term can change, what it cannot change, and where to look when something behaves unexpectedly.
Changing one custom property across many rules
--accent: #f35120 can be defined once and reused with color: var(--accent), making theme changes more systematic.
Where tokens meet the cascade
You do not need to memorize the term in isolation. It becomes useful when you can recognize it in the tool, browser, file or conversation where the concept is doing real work.
CSS variables are not preprocessor variables
A CSS custom property, often called a CSS variable, is an author-defined property whose value can be reused with the var() function. By contrast, The CSS cascade is the set of rules used to resolve which declarations apply when multiple declarations target the same property on the same element. The two can appear in the same project, but they describe different parts of the work and should not be used as interchangeable labels.
The mistake: treating custom properties as global constants
The common mistake is to use CSS Variable as if it also meant Cascade. That blurs two separate decisions and usually sends troubleshooting in the wrong direction. A better test is practical: Inspect the computed variable value and its scope; custom properties inherit unless overridden.
Why runtime values improve theming
In day-to-day work, CSS Variable matters when the concept needs to be identified precisely instead of being grouped with a nearby term. The practical value is not the vocabulary itself; it is being able to identify the right control, file, setting or decision when the concept becomes relevant.
--accent: #f35120 can be defined once and reused with color: var(--accent), making theme changes more systematic. That example is useful because it turns the definition into something you can recognize, test and discuss with other people working on the same project.
Related terms worth learning next
Sources and further reading
Use these references when you need documentation-level detail, specifications or product-specific behavior beyond the plain-English explanation above.