Re: line-height: <number>

On Tue, 1 Feb 2000, Erik van der Poel wrote:

> [ line-height: <number> ]
> 
> (1) It says "multiplied by the element's font size". Would that be
> the computed or actual value of font-size?

The same as with 'em'. i.e., a line-height of '3.4' means '3.4em'. The
only difference between specifying 'em' and <number> for 'line-height'
is the rather important difference in how it is inherited.

(Of course, this begs the question "'em': specified, computed, or
actual font-size?" And I would strongly vote for _actual_, taking into
account multiple fonts in substitution and all the other ugly things
that can happen. I don't think the spec is explicit on this though.)

 
> (2) If the number is inherited, do we multiply it by the font-size
> of the element that we inherited the number from, or by the
> font-size of *this* element?

This element. Otherwise, it would be identical to the 'em' unit! The
important effect of this is that <number> is always a _safe_
line-height to give -- if a child element has a vastly bigger
font-size, we get a vastly bigger line-height using <number>, and a
lot of overlap using <length> (such as 'em').

HTH,
-- 
Ian Hickson                            ("`-''-/").___..--''"`-._   
http://www.bath.ac.uk/%7Epy8ieh/        `6_ 6  )   `-.  (     ).`-.__.`)
                                        (_Y_.)'  ._   )  `._ `. ``-..-' fL
Member, Mozilla Quality Assurance     _..`--'_..-_/  /--'_.' ,'
Browser Standards Compliance Team    (il).-''  (li).'  ((!.-'    

Received on Thursday, 3 February 2000 20:00:42 UTC