@property

A CSS rule that registers a custom property with a type, an initial value and whether it inherits.

In more detail

Registration can also be done in JavaScript with CSS.registerProperty(). Because the browser then knows the value is, for example, a colour or a length, it can check it and animate between values, which plain custom properties cannot do.

Example

@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

Related terms

Taught in

References