<sign>

A math function that returns -1 for negative numbers, 0 for zero, and 1 for positive numbers. It's useful for logic-based styling directly in your CSS.

/* Usage Example */
.dynamic-element {
  /* Scale based on whether the --score variable is positive or negative */
  transform: scale(sign(var(--score)));
}
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