Learning Web App Development

by Semmy Purewal

fixed vs relative font-size keywords

page 75

04 Jan 2015

On page 75, there is a discussion about relative vs. fixed font sizes. Unfortunately, I got some of the facts wrong here.

It turns out that xx-large and x-large (along with xx-small and x-small) are absolute-size keywords, not relative-size. So changing the base font-size will not change elements that are styled with those keywords.

On the other hand, larger and smaller are relative font-size keywords, and work as described. The specifics can be found here in the W3C's documentation.

Github user bazzaxiv was kind enough to report this and provide the reference. Thanks so much!