concept
Design token — CSS reference
A design token is a named design decision such as a spacing or color value. A CSS custom property can carry a token into web styles; the token concept is not identical to custom properties or a particular exchange format. The shared spacing value controls two dimensions.
Formal Syntax & Structure
css syntaxcss
--space-2: 8px;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>design-token</title><style>body{margin:8px;font:16px/24px sans-serif;color:black;background:white}#a{box-sizing:border-box}:root{--space-2:8px}#a{padding:var(--space-2);margin:var(--space-2)}</style><body><div id="a">Sample</div></body></html>