11.1. Use only relative font sizes (rem, em, %, etc.)
To set the font size, use only relative units in CSS font-size
such as rem
, em
, %
or keywords (x-small
, small
, etc.).
Do not use absolute units such as pt
, cm
, etc.
Warning
Although the pixel (px
) can be used to define font size, it can prevent font size increase in some cases.
We strongly advise against using it.
Note
This recommendation does not apply to CSS print (media type print
).