<sign>

Returns the sign of a number: -1, 0, or 1. Useful for conditional calculations.

Quick example

.sign { color: calc(sign(-5) * 1); }

<sign> Browser Support

Limited availability 58% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Not ready for production without a fallback.

ESC