The Best CSS Unit Might Be a Combination | OddBird

September 29, 2025

Close-up of three measuring tools: a yellow tape measure marked in inches and centimeters, a translucent ruler labeled in meters and centimeters, and a metallic ruler marked in inches with 1/32 subdivisions.

There are many articles and established CSS best-practices that rely on determining the correct or best units to use. Now that comparison functions are well supported in CSS, we don’t have to choose.

Source: The Best CSS Unit Might Be a Combination | OddBird

Which units to use for font sizing has been a point of debate and consideration since the earliest days of CSS.

For the longest time, pixels were units to be avoided since in at least some browsers, zooming the page (where font sizes were set in pixels) meant the text remained fixed in size.

Times have changed, so how should we think about units for text size these days? Miriam Suzanne explores that here, and of course, the answer is “it depends”.