Le 27 juin 2013 à 15:27, "Jukka K. Korpela" <jkorp...@cs.tut.fi> a écrit :

>>> Technically, if you wish to have such settings as a global default for your 
>>> pages, setting them on <body> rather than <html> is the way to go.
>> 
>> Again, Why?
> 
> Because it sets the properties directly on the highest-level element where 
> they might have some effect, rather than affecting indirectly via inheritance.

Uh. HTML is the highest level where (some) properties will have an effect that 
matter for inheritance.
Consider this snippet:

html { /* nothing set here, just the initial values set by the UA */}
body { font: .8em/1.5 sans-serif;  }

article > p { font-size: 1rem; }

vs

html { font: .8em/1.5 sans-serif;  }

article > p { font-size: 1rem; }

And the consequences of that snippet will go beyond just font-size, as you can 
imagine.

> Inheritance is the most widely misunderstood concept in CSS and causes 
> surprises even to those who understand it in principle.

No argument against that one… :-)

> > 'Simpler' is not exactly a good or well reasoned argument.
> 
> Other things being equal, it is. And in the CSS context, simplicity is a 
> strong argument, especially here, since it helps to avoid both conceptual and 
> practical problems.

Oh, I'm a big fan of simplicity, thing is, in this particular context that 
simplicity is not simply not clear cut, particularly when it comes to the 
font(-size) property, and the cascading effects it has on other properties.

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