Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The sign()
CSS function contains one calculation, and returns -1
if the numeric value of the argument is negative, +1
if the numeric value of the argument is positive, 0⁺
if the numeric value of the argument is 0⁺, and 0⁻
if the numeric value of the argument is 0⁻.
Note: While
returns the absolute value of the argument, abs()
sign()
returns the sign of the argument.