3 ms·
Why use anything other than percentage for font size? The browser sets the font size based on user preference. If you want text twice as big as usual, you make
by hypertele-Xii 6y ago
Why use anything other than percentage for font size? The browser sets the font size based on user preference. If you want text twice as big as usual, you make it font-size: 200%;
Being able to supply any other units is a misfeature, in my opinion.
- bloak 6y agoI would guess (from very little practical experience in this area) that you probably want to use "100%" for the main text, because, like you say, that's the user's preference and depends on things like how far away the user is from the screen and how good the user's eyesight is, which cannot be determined other than by asking the user. However, using "200%" unconditionally doesn't sound like a great idea because that might lead to lines with far too few characters in them. If you have a user who cannot read the text unless the font is so large that you only have about 20 characters across the width of the screen then you probably don't ever want to double the font size. (That might be a visually impaired user, but it could also be appropriate for a relatively small screen mounted in a public place.)