abs() and sign()Baseline · Newly available
The abs() and sign() CSS functions compute the absolute value or the sign of the input.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Jun 26, 2025.
Browser support
DesktopChrome
1–137Not supported
138+Supportedsince Jun 24, 2025
Current: 155Edge
12–137Not supported
138+Supportedsince Jun 26, 2025
Current: 154Firefox
1–117Not supported
118+Supportedsince Sep 26, 2023
Current: 157Safari
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27MobileChrome Android
18–137Not supported
138+Supportedsince Jun 24, 2025
Current: 155Firefox Android
4–117Not supported
118+Supportedsince Sep 26, 2023
Current: 157Safari iOS
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27How to use
Every current browser supports this, but it only became Baseline on Jun 26, 2025. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN: abs.
Feature detection
CSS · check before using
@supports (width: abs(-1px)) {
/* styles that use abs */
}
/* or in JavaScript */
if (CSS.supports("width", "abs(-1px)")) {
// use it
}Specification
Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.