Re: [media-queries] chicken-egg problem with font-based lengths

On Sun, Aug 19, 2012 at 10:23 AM, Giuseppe Bilotta
<giuseppe.bilotta@gmail.com> wrote:
> the main question: which values of font-based length (em, ex) are used
> when evaluating length-based media queries that make use of them?
> For example, say that I have a media query of the sort: @media
> (min-width: 66em).

Both 'em' and 'rem' units in media queries are based off of the
*user's default font size*, not the font size of the root element.
This is not something that can be changed by CSS, and it's known
before the page ever loads.

Most of the time, 1em will thus equal 16px (the most common default
font size).  However, users may adjust their default up or down (most
commonly up, to help make text more readable).

~TJ

Received on Sunday, 19 August 2012 20:01:46 UTC