W3C home > Mailing lists > Public > www-style@w3.org > February 2000

Re: line-height: <number>

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Fri, 4 Feb 2000 01:00:38 +0000 (GMT)
To: Erik van der Poel <erik@netscape.com>
cc: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.10002040055310.9070-100000@mary.bath.ac.uk>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:03 GMT