Andrew's Digital Garden

CSS units

em - font size of the parent element rem font size of the root element

em is a good candidate for adding padding to typographic elements. That way, when the font-size of the text grows, the padding/spacing between components grows also.

Character units

Both ch and ex pertain to the (approximate) width and height of one character respectively.

ch is equal to the width of a 0 ex is equal to the height of a x

ch is helpful for restricting max-widths for readability. [[20210201144247-line-length]]

[[20220104103715-viewport-units]]

[[css]] [[typography]]

Referred in

CSS units