Typed custom property
noun
say it: “TYPET KUS-tum PROP-er-tee” /taɪpt ˈkʌstəm ˈprɒpərti/
A custom property registered with @property so the browser knows its type, such as a color or a length. The browser can then check its value and animate it smoothly.
What is a typed custom property?
A typed custom property is registered with a type, like a color or a length, so the browser checks it and can animate it.
@property --glow { syntax: "<color>"; inherits: false; initial-value: transparent; }
.button:hover { --glow: gold; transition: --glow 0.3s; }
In a sentence
- “Once --angle became a typed custom property, the gradient turned smoothly instead of jumping.”
Level: Master · More CSS terms at this level
Updated