Mr. Harun wants his batik wheel to turn: write the @property rule, run a 1s transition, and getComputedStyle every frame shows whether your element and its…
Why it matters
Animating a gradient angle, a colour inside a gradient, a counter, a progress bar: they used to need JS. With @property it is all plain CSS, because the browser can interpolate the custom property.
The key idea
A custom property cannot be animated until it has a type
Common mistakes
A custom property transition does not run, it only jumps Without a registered type the browser treats it as text and cannot compute the values in between. Register it with @property and a fitting syntax, say <angle>.
An @property rule looks right but is silently ignoredsyntax, inherits and initial-value are required (initial-value may be missing only with syntax '*'), and the initial-value must not depend on context (1em or var() is rejected). One wrong, and the whole rule is dropped.
A custom property falls back to its initial value for no clear reason A value that does not match its type is invalid, and the initial-value is used. <angle> needs a unit (360deg, 1turn): a bare 360 is rejected.
Try it in this playground
Run it with and without @property Watch the board: a smooth climb vs a straight jump.
Type 1turn in the "to" field When registered, the browser keeps it as 360deg. Without @property it stays 1turn as written.
Delete initial-value or inherits The rule status turns into "dropped by the browser". No error in the console.
Make the child turn Switch "read by" to its child. With inherits: false the child stays still; turn on inherits: true.