<random>
Newly availableSince 202660% of users
A new CSS math function that picks a random value from a range of possibilities. This allows for native CSS randomness without needing JavaScript.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since November 2026. Widely available around May 2029.
See how modern your own CSS is.Check your CSS →
Quick example
.scatter-item {
/* Pick a random rotation between -10deg and 10deg */
transform: rotate(random(-10deg, 10deg));
/* Each element will get a slightly different random value */
}<random> browser support
BaselineNewly availableSince 2026 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.
Usage60%of people can use this40% use a browser without it.
Browsers
156+
161+
26.2+
156+Mobile
156+Android
161+Android
26.2+iOS
Interop 2027 candidate. Tracked for Interop 2027. Official focus areas publish early 2027; proposals are open through September 2026. See Interop 2027 →