@property
Newly availableSince 202496% of users
The @property at-rule allows you to register custom CSS variables with a specific data type and initial value. Because the browser knows the type, you can animate things that used to jump, like gradient colors.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since July 2024. Widely available around January 2027.
The old way and the modern waySee the snippet: Typed custom properties without JavaScript →
Old way 8 lines
:root {
--hue: 0;
}
.wheel {
background: hsl(var(--hue), 80%, 50%);
transition: --hue .3s;
/* ignored, not interpolable */
}Modern 9 lines
@property --hue {
syntax: "<angle>";
inherits: false;
initial-value: 0deg;
}
.wheel {
background: hsl(var(--hue), 80%, 50%);
transition: --hue .3s;
}See how modern your own CSS is.Check your CSS →
Quick example
@property --brand-color {
syntax: '<color>';
inherits: false;
initial-value: #3498db;
}
.box {
background: var(--brand-color);
transition: --brand-color 0.3s ease;
}@property browser support
BaselineNewly availableSince 2024 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.Works in all modern browsers. May need a fallback for older browsers.
Usage96%of people can use this4% use a browser without it.
Browsers
85+
128+
16.4+
85+Mobile
85+Android
128+Android
16.4+iOS