Le 25 juil. 2014 à 15:06, John <j...@coffeeonmars.com> a écrit :

> Is there a way to tell the browser…*any* browser: 1em = 16px and that’s that?
> 
> Or is
> 
> body
> {
>       font-size:100%;
> }
> 
> —with the underlying hope and assumption that 100% is understood to mean 16px 
> and from there the leap that 1em equals the 16pixels — all we have in that 
> toolkit?

You could conceivably force the assumption that the base font-size is 16px:
html { font-size: 16px; }

Then 1em = 16px, until you write something like

p { font-size: .85em; padding: 1em; }

Your 'em' (padding) in that case will definitively *not* be equal to 16px ………

Forget about that equation of 1em = 16px; it is useless. Think differently, in  
terms of proportions, as in “I want the padding around that block of text to be 
twice the font-size”, or I “want that headline to be twice as big as my body 
text” and don’t spend time translating that into something that *might* result 
in being equal to 32px or whatever.

Philippe
--
Philippe Wittenbergh
http://l-c-n.com




______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to