Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please don't suggest to use px values for font-size #46

Closed
nhoizey opened this issue May 27, 2016 · 3 comments
Closed

Please don't suggest to use px values for font-size #46

nhoizey opened this issue May 27, 2016 · 3 comments

Comments

@nhoizey
Copy link

nhoizey commented May 27, 2016

Use rem for Global Sizing; Use em for Local Sizing -> YES!

But… html { font-size: 16px; } -> pleaaaase noooo! :-/

https://nicolas-hoizey.com/2016/03/people-don-t-change-the-default-16px-font-size-in-their-browser.html

@AllThingsSmitty
Copy link
Owner

@nhoizey thanks for the feedback. Your post is interesting. Are you advocating more for just html { font-size: 1em; } to let the default value be interited per browser?

@nhoizey
Copy link
Author

nhoizey commented May 27, 2016

@AllThingsSmitty thanks for reading it! ;-)

html { font-size: 1em; } is useless, as it is the default value. So I would advocate for nothing at all.

To be honest, I now use something a little more complex on the body to add some fluid responsiveness to my font-size, but I don't touch the html font-size at all and the value on body is meant to be equal to 1em or more, depending on viewport sizes.

@litera
Copy link

litera commented Jun 6, 2016

@nhoizey That's a very interesting way of defining font size. Congrats on that. But can you please elaborate how you got to this specific value .8em+.3vw+.3vh? What reasoning did you use?

But in general I think your font size settings are the way to go in the typographic world of things. It's just that you should also include/incorporate some sort of content width/content grid and font family into this expression. If we look at typographers' text block width table this should become the golden standard of setting readable font size based on text block width and font used. Viewport size may even be obsolete unless it's content uses 100% its width.

The usual typographer's bible (Elements of Typographic Style — Robert Bringhurst) has this table with width/font size/character count values
image
If I have to create a website for readability I try to base sizes according to my grid/text block size and this table or at least approximate on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants