3 ms·
> Why font-size must NEVER be in pixels This isn't really right (especially putting "NEVER" in caps). Mainly because this is somewhat misleading: > If you've
by jmull 3y ago
> Why font-size must NEVER be in pixels
This isn't really right (especially putting "NEVER" in caps).
Mainly because this is somewhat misleading:
> If you've used pixels to define any of the above style properties, these will not respect the user's font size preferences
The user is setting the default font size, which isn't quite the same thing as their preferred font size. And while only specifying relative font sizes will make this into a kind of global font size preference, there are other, usually better, ways to address accessiblity.
> I once walked in on my mum holding a magnifying glass up to her computer screen because she didn't know she could change the text size!
Do her a favor and show her the browser's "zoom" function (which works fine on font sizes specified by pixel or point), or, for that matter, show her accessibility features of her OS. These are probably going to work much better for her than adjusting the browser's default font size. e.g., font size isn't the only thing you might want to make bigger or layout differently when a person has issues seeing small things. (And it doesn't require getting the world of web devs to buy into a convention of dubious value.)
BTW, to follow the advice of this article, you can only use relative font sizes, so no "points" either.