<hypot>
A math function that calculates the hypotenuse of a right-angled triangle (the square root of the sum of squares of its arguments). It is useful for complex mathematical layouts where you need to calculate diagonal distances.
Quick example
.diagonal-line {
/* Calculates a distance based on X and Y offsets */
width: hypot(100px, 100px);
} <hypot> Browser Support
Newly available Since 2023 88% global usage
Since 2023 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Works in all modern browsers. May need a fallback for older browsers.
120+
118+
15.4+
120+