<round>
A math function that rounds a value to the nearest multiple of another value. For example, you can use it to ensure a width always rounds to the nearest 10 pixels.
Syntax
/* Usage Example */
.box {
/* Rounds 15.7px to the nearest multiple of 10px (which is 20px) */
width: round(15.7px, 10px);
}
<round> Browser support
Newly available
Since
2024 86% global usage
Since 2024 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
125+
118+
15.4+
125+