CSS Properties and Values API (@property)
Register custom properties with types and inheritance using @property for animatable CSS variables.
What is @property?
@property is the CSS way to register a custom property with a type, inheritance behavior, and initial value. It is the declarative form of the CSS Properties and Values API (CSS.registerProperty).
@property Syntax
Register a custom property with three required descriptors:
@property --rotation {
syntax: "<angle>";
inherits: false;
initial-value: 0deg;
}All lessons in this course
- The CSS Typed Object Model (OM)
- CSS Properties and Values API (@property)
- CSS Paint API: Worklets
- CSS Layout API and Scope