W3C home > Mailing lists > Public > www-style@w3.org > April 2004

Re: line-height: <length> should be revoked

From: David Woolley <david@djwhome.demon.co.uk>
Date: Mon, 12 Apr 2004 09:59:16 +0100 (BST)
Message-Id: <200404120859.i3C8xGm06621@djwhome.demon.co.uk>
To: www-style@w3.org

> That's correct.  That is in fact what the specification requires.

In that case the specification is so counter-intuitive as to be
dangerous (it encourages naive authors to default line-height, as
a relatively obscure property - basically you are making the size
in presentational HTML map to two properties in CSS, even though
one can always be set as 1.2em, but authors will assume that it
maps to just the one property - and it also encourages "pixel perfection"
authors to specify line-heights in absolute units[1], which is incompatible
with the brand leader, IE's, accessibility options).

It does, however, seem to me that the browser default style sheet can
override the problem inheritance, so that IE behaves legally as well
as sensibly with regard to the handling of line-height, for rendering,
if not for accessibilty options.  It seems, therefore, that the three
browsers with that require line-height are at fault in their choice
of default style sheet.  (I would actually suggest that whoever wrote
the example default style sheet in the CSS2.0 specification, failed to
appreciate the issue, and intended that default style sheet to make line
height scale with size - in fact, looking at some of the Hn font-sizes,
that is the only reasonable interpretation, as they would produce
guaranteed overlaps in material only styled with that default sheet.)

Looking back to the original example, all it seems to be trying to do is
to replace 1em with 100% in the sample default style sheet, presumably
because of subtleties in how the root font size is determined, at least on
some browsers.  Unless the browser default line-height is some magic token
that inherits as a relative size, but cannot be re-instated by a user,
one would expect the headings to break even without the rules quoted.

[1] I'm beginning to wonder if this has been happening because of 
browser compatibility as much as pure pixel perfection - either way
it seriously compromises the "ignore author font sizes" option.
Received on Monday, 12 April 2004 05:59:42 GMT

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