When making a responsive stylesheet. Is it better to keep the text sizes the same pixel size. Note I am using the following to normalize the sizes across. Also for the purpose of this question I'm limiting to a single type-face for simplicity.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Or does it make sense to have different sizes as a norm.
e.g. on mobile use 14px
default body text size vs tablet which has 16px
font size and desktop which has 20px
font size
vs
16px
default body text size regardless of display.
From a technical point of view keeping one size makes it easier to manage the design rather than having altering CSS font sizes between devices.
Related:
- Smaller font sizes on smaller screen devices
- https://ia.net/topics/responsive-typography-the-basics a lot of words but I think the net of it is that it should be the different.
- https://blog.logrocket.com/using-em-vs-rem-css/ also uses device specific base font size BUT at least everything is relative due to the use of
rem
therefore making it easy to code as well.
px
for font sizes is considered a bad practice; the better practice is to useem
. This also accommodates people who need to resize text. It also potentially allows you to use a single style sheet for all sizes of device screen, since the size of the em can be set by the device/device user.em
but it does allow scaling from px.rem
); see this StackOverflow question. I don't have access to full documentation, but support for therem
suggests that it should also support theem
.