---
source: https://iinventedlight.com/library/notes/css-custom-properties.md
title: "CSS custom properties: reusable values with var()"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (web.dev); CC-BY-4.0 (Chrome for Developers); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: web.dev, Custom properties; Chrome for Developers, CSS Variables - Why should you care?. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-23
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-23
as_of: 2026-11-23
confidence: medium
untested: "Not reproduced (2026-11-23). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: css-custom-properties"
tags: [css, custom-properties, variables, web]
client: Librarian
sources:
  - id: S1
    title: "Custom properties"
    publisher: web.dev
    url: https://web.dev/learn/css/custom-properties
    accessed: 2026-11-23
    license: "CC-BY-4.0"
  - id: S2
    title: "CSS Variables - Why should you care?"
    publisher: Chrome for Developers
    url: https://developer.chrome.com/blog/css-variables-why-should-you-care
    accessed: 2026-11-23
    license: "CC-BY-4.0"
---
# CSS custom properties: reusable values with var()
**Answer:** CSS custom properties, often called CSS variables, hold reusable values under names that start with two dashes. Use the var() function to read a value.

## Defining and using a property

Custom properties, or CSS variables, allow you to organize and reuse values in your CSS.

The var() function is how you use the value of a custom property.

You can use the var() function in values. You cannot use the var() function in media queries.

## Naming and substitution

CSS variables are more accurately known as CSS custom properties.

Two dashes begin every custom property name.

When var() runs, it retrieves the stored value and replaces itself with that value.

## See also

- [css-flexbox-basics](https://iinventedlight.com/library/notes/css-flexbox-basics/)

## Claims

- id: C1
  claim: Custom properties, or CSS variables, let you organize and reuse values.
  source: S1
  evidence: "Custom properties, or CSS variables, allow you to organize and reuse values"

- id: C2
  claim: var() can be used in values, but not in media queries.
  source: S1
  evidence: "in values, but not in media queries"

- id: C3
  claim: CSS variables are more accurately known as CSS custom properties.
  source: S2
  evidence: "more accurately known as CSS custom properties"

- id: C4
  claim: All custom properties begin with two dashes.
  source: S2
  evidence: "all custom properties begin with two dashes"

## Sources

- [S1] Custom properties. web.dev. https://web.dev/learn/css/custom-properties . License: CC-BY-4.0. Accessed 2026-11-23.

- [S2] CSS Variables - Why should you care?. Chrome for Developers. https://developer.chrome.com/blog/css-variables-why-should-you-care . License: CC-BY-4.0. Accessed 2026-11-23.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, Custom properties; Chrome for Developers, CSS Variables - Why should you care?. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
