concept
guaranteed-invalid-value — CSS reference
The initial value of an unregistered custom property is a special guaranteed-invalid value. Cycles can also produce it. A var() fallback intercepts this state. A valid token sequence unsuitable for the consuming property instead fails its computed-value validation; the earlier declaration is not restored.
Formal Syntax & Structure
css syntaxcss
--size: initial; width: var(--size, 55px);Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS substitution lab</title><style>body {margin:0} .sample {height:12px;background:#006050}#parent {width:300px} .sample {width:40px;height:30px;margin-bottom:4px;color:white}#a{--size:initial;width:var(--size,55px)} #b{--size:red;width:20px;width:var(--size,55px)}</style><body><div id="parent"><div id="a" class="sample">A</div><div id="b" class="sample">B</div></div></body></html>