masakudamatsu / template

Template code for making a website
MIT License
1 stars 0 forks source link

Set the base font size #13

Open masakudamatsu opened 6 years ago

masakudamatsu commented 6 years ago

In the CSS code, we should not set the base font size for the html selector.

Tim Brown in his Flexible Typesetting (Chapter 2) puts forward a convincing argument. We should not remove the user's option to change the font size for someone who "has impaired vision and uses a larger font-size in their browser settings" and someone who "with a motor impairment sets a very small font size in their user preferences, so they can read without having to scroll as much."

To make this choice explicit (which is the default setting), Tim Brown recommends

html {
  font-size: 100%; 
}

Below needs to be edited:

The base font size for mobile and tablet devices is set to be 16px, following the guideline by Learn UI Design Blog. Below this value, iOS will zoom in when the user enters the text.

For laptop and desktop screens, the base font size should be larger because we sit in front of the desktop with some distance. We set it to be 21px, following Medium. Since we use rem for box sizes etc., all else will then change with the proportion intact.

masakudamatsu commented 5 years ago

We have to rethink of the merit of setting the base font size, because it removes the user's option to change the font size.