Skip to main content

Harshal V. LADHE

The CSS @property Rule

Registering custom properties with `@property` to give them a type, an inheritance rule and an initial value, so they can animate and be type-checked.

Content tagged at-property

  • Tutorial:Animate and Type-Check CSS Variables with @property

    Give CSS custom properties real types so they animate.
    Register CSS custom properties (CSS variables) with @property — a syntax, an inherits rule and an initial value — so they animate in transitions and keyframes, fall back safely on invalid values and always have a default. Covers rotating gradients, counting numbers and per-axis motion, CSS.registerProperty(), performance, browser fallbacks and common pitfalls.
    Published at:
    Categories:CSS
    Estimated reading time:6 min read