The CSS ex unit measures length relative to the x-height of the element’s font—the distance between its baseline and meanline. Because it follows the typeface’s characteristics as well as font size, it helps size and space typography-related details consistently. section 10.8
Sizing an error icon
An error message uses a ::before pseudo-element for a consistent icon. Set its width and height to 1.25ex, align it to the baseline, and separate it from the text with .5ch. The ex unit makes the icon relate visually to the surrounding type. section 10.8
