descriptor

@property/initial-value — CSS reference

Defines the registered default. Typed syntax requires this descriptor, a matching value and computational independence. Universal syntax permits omission, in which case the default is guaranteed-invalid. A registered default is distinct from a var() fallback.

Formal Syntax & Structure

css syntaxcss
initial-value: 24px;

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}@property --gap{syntax:"<length>";inherits:false;initial-value:24px} .sample{width:var(--gap,99px)} #b{--gap:initial}</style><body><div id="parent"><div id="a" class="sample">A</div><div id="b" class="sample">B</div></div></body></html>
CSS Reference