tips

Tip 002 - Character Unit

Along with px and % and all the others, we also have the character width unit: ch

One ch will equal whatever the width of the 0 (zero) character is. This means that the larger the font, the larger the unit will be. And the width can vary between different fonts that have wider or thinner characters.

The ch unit shines especially when you're defining how wide a paragraph can be, for legibility. Generally for better readability, you don't want the paragraph to be wider than somewhere between 60-85ch or so. Your site's styling, font choice, and other context all are factors in how wide your paragraphs should be.

More info about this and other CSS units for length can be found on MDN.

 

Have you written a reply to this post? Send me the URL here: