This looks like a simple authoring error to me; a number should be used for the line-height, not a length, unless you really want to clobber it for all descendants.
Seems like the only authoring error is wanting ample line-height, and setting it the logical way, by setting a percentage in body. Looks like the only way to do that according to the current spec would be '* {line-height: 1.2;}'.
Of course not. "body { line-height: 1.2 }" will do exactly the right thing. The author is not setting a percentage in body; the author is setting an explicit length (hence my example using 10px).
As for why it works, that way, consider:
<body style="font-size: 10px; line-height: 10x">
That should have been "line-height: 10px", btw.
<p> p1 </p> <p> p2 </p> <p> p3 </p> </body>
The line-height of each <p> should be 10px, no?
I don't know. What is normal line-height for 10px font-size, 11px? Everything would be 16px on your laptop anyway. ;-)
The point is, if we insert a random block node in between the place where we declared a line-height and our text, should the line-height of the text change? If so, why? Should the author be forced to specify a line-height on every <p> in this common document case? Surely not! THAT is why line-height is inherited.
> How to express that in CSS?
Express what? Line-height in each p should be normal, since no valid one has been set.
See, this is the problem. Doing that makes setting line-height very very difficult, since you have to worry about whether there's a random <div> or <p> lying about.
Apparently the current spec allows inheriting a line-height specified in length, but I don't think it should.
Again, line-height either inherits or it does not. It needs to inherit to get the simple common case right (long document in which you want to set the line-height up front and have it apply to everything). If one uses a number line-height, it will even look good. The other values are useful for some cases, but for 99% of cases you want to stick with number line-height.
In fact, it seems to me your real issue is that line-height can be specified as an absolute length to start with. I actually think that this is overkill that gives authors rope to hang themselves with, but they demanded it, apparently.
-Boris _______________________________________________ mozilla-layout mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-layout
