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

On which font size is line-height based?

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Sat, 20 Feb 1999 19:35:17 -0500 (EST)
Message-Id: <199902210035.TAA27189@login5.fas.harvard.edu>
To: www-style@w3.org

In the definition of line-height [1], the spec defines <number> values
to depend on the "element's font size" and <percentage> values to
depend on the "element's computed font size".  This difference was
recently pointed out to me, and I'm wondering why it exists.
Furthermore, I also wonder if, instead of computed font size, actual
font size was meant.  These terms are explained in the definition of
font-size [2]:

  The actual value of [font-size] may differ from the computed value
  due a numerical value on 'font-size-adjust' and the unavailability of
  certain font sizes.

It doesn't make sense to me that if a font was specified as 10px but only
available as 16px, then a line-height of 1.2 (or 120%) should result in
a line-height of 12px.

I think both these statements should be changed so that line-height
depends on the actual font-size, not the computed font-size.  (Even if
it should be computed, I definitely think they should be the same,
unless there was some reason I don't see.)

David Baron

[1] http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-line-height
[2] http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-size
Received on Saturday, 20 February 1999 19:35:19 GMT

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