- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Sun, 11 Apr 2004 17:52:01 -0500
- To: David Woolley <david@djwhome.demon.co.uk>
- Cc: www-style@w3.org
David Woolley wrote: >>That's exactly what happens when you set the line-height as a ratio (eg >>"line-height: 1.5"). But if the page has: > > That's good, but the first respondent seemed to be saying that > line-height inherited as a size resolved to absolute units That's how lengths inherit in CSS in general (when the specified value is a length). Or rather, that's what the computed value of something specified as a length is, in general. > the example was 1.2em and 20px resulting in 14.4px instead of > 24px and he seemed to be saying that that was what the specification > required. That's correct. That is in fact what the specification requires. > I wrote "if this is the case" because it didn't seem right. Why not, exactly? The point is that if you compare <foo style="font-size: 10px; prop: 1.5em"> <bar style="prop: inherit"> </foo> to <foo2 style="font-size: 10px; prop: 15px"> <bar2 style="prop: inherit"> </foo2> the computed value of "prop" should be the same for "foo" and "foo2" (the equivalent of 15px in whatever the internal representation is). Then that computed value inherits to "bar" and "bar2". This is how length units compute and inherit in general in CSS, and this is why there is a "number" value possible for line-height -- because for line-height this model is sub-optimal. Now the question (raised by the original post) is whether length values of line-height should be eliminated altogether. It's not a bad idea, really..... it would have been better had it come a few years ago, but... -Boris
Received on Sunday, 11 April 2004 18:52:05 UTC