<abs>
A mathematical function that turns any number into its positive version. For example, if you have a calculation that results in -10px, abs(-10px) will return 10px.
Quick example
.box {
/* Ensures the width is always positive, even if --size is negative */
width: calc(abs(var(--size)) + 100px);
} <abs> Browser Support
Newly available Since 2025 82% global usage
Since 2025 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.
138+
118+
15.4+
138+