CSS Length Units | CSS-Tricks – CSS-Tricks

June 5, 2024

Many CSS properties accept numbers as values. Sometimes those are whole numbers. Sometimes they’re decimals and fractions. Other times, they’re percentages. Whatever they are, the unit that follows a number determines the number’s computed length. And by “length” we mean any sort of distance that can be described as a number, such as the physical dimensions of an element, a measure of time, geometric angles… all kinds of things!

Source: CSS Length Units | CSS-Tricks – CSS-Tricks

CSS is complex, and at times challenging–part of that is even knowing all the capabilities and possibilities.

Here Geoff Graham does an excellent job of rounding up all the kinds of length units there are in CSS.