<mod>
Newly availableSince 202492% of users
A math function that returns the remainder of a division (modulo). This is useful for complex layouts where you need elements to repeat or cycle based on a value.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since May 2024. Widely available around November 2026.
See how modern your own CSS is.Check your CSS →
Quick example
.pattern-offset {
/* Calculates an offset that wraps around every 20px */
left: mod(var(--current-pos), 20px);
}<mod> 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.
Usage92%of people can use this8% use a browser without it.
Browsers
125+
118+
15.4+
125+Mobile
125+Android
118+Android
15.4+iOS