liip/kanbasu

Impossible to set the $font-size-default with percentage values.

Closed this issue · 3 comments

In order to let the user choose his default font-size, I would like to be able to set the $font-size-default with percentage values.
WDYT?

The historical reason to set body font-size in percentages was because of a bug in old versions of IE. Today I don’t see the point of doing it especially since setting a fix value allow us to do various useful calculations.

Is there any other reason that prevents you from using pixels?

The reason is the user can adapt the default browser font-size in settings, on modern browsers.

When you set font-size: 20px on the <html> element you don't let the ability to the user to have his personal settings applied. Using percentage for font-size on the <html> element and rem unit for children make your layout scale when the user change his font settings.
http://kyleschaeffer.com/development/css-font-size-em-vs-px-vs-pt-vs/

This is definitely better in terms of accessibility.

You're point about the useful calculation is valid though we could do it a bit differently.

Seems legit, I’ll see how I can make both live together then.