I noticed that many of the default font-sizes that Shopify put are using rem. So when I change the font-size should I use rem too or can I use pixels?
Hi @wellcome ,
This is David at SalesHunterThemes.
You should use rem instead of pixel.
This issue actually relates to how CSS units respond to browser settings. Users can go to their browser settings and modify the browser’s default font size.
This is great for users that have visual impairment.
However, if you check the browser, the paragraph with the absolute unit of 24 pixels will remain at 24 pixels the same regardless what the user’s preference is. The relative unit, on the other hand, grows with the default settings of the browser.
So this is really an accessibility concern.
Therefore, any time you’re defining font-sizes, you should absolutely (or relatively?) use rems.
Rems are more accessible for font-size.
Rems are (probably) better for media queries.
And I think it’s easier to just stick to one simple rule (with occasional exceptions) than it is to mix things.
Hope this can help.
David | SalesHunterThemes team.