2013-06-27 9:52, Philippe Wittenbergh wrote:
HTML is the highest level where (some) properties will have an effect that matter for inheritance.
The <html> element is the root element, so it cannot inherit anything. Its properties may be inherited by its children.
Consider this snippet: html { /* nothing set here, just the initial values set by the UA */} body { font: .8em/1.5 sans-serif; }
Whenever you use the em unit or the % unit on font-size, you need to take into consideration that it is relative to the parent font size. This has nothing to do with inheritance. Here you *prevent* <body> from inheriting font size from its parent, <html>.
Anyway, I don’t see why this would imply any need for setting anything on the <html> element.
article > p { font-size: 1rem; }
Well, the rem unit is special, because it is defined as the root element font size. I see no reason to use it (it still has limited browser support, and you can use the em unit instead - with due consideration of cumulative effects), but if you do, then it gives you the browser default. If that’s not what you want, you can set font-size on <html>.
So this could be a case for setting something on <html> beyond margin and padding – but only when you wish to use the rem unit *and* you want to override the browser’s default font size.
Yucca ______________________________________________________________________ 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/