<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.

/* Usage Example */
.box {
  /* Ensures the width is always positive, even if --size is negative */
  width: calc(abs(var(--size)) + 100px);
}
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+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC