<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.
Syntax
/* Usage 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.
138+
118+
15.4+
138+