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

Re: User constant declarations in style sheets

From: David Woolley <david@djwhome.demon.co.uk>
Date: Mon, 25 Apr 2005 20:24:48 +0100 (BST)
Message-Id: <200504251924.j3PJOnc01620@djwhome.demon.co.uk>
To: www-style@w3.org

> want to keep your text in phase. It would then be natural to
> express heights in terms of the leading, which would be itself
> derived from the font size with a factor. At the moment this
> factor would have to be repeated all over the style sheet.

This use case is invalid as there is a unit type for line-height,
the one typically used in user agent style sheets although, unfortunately,
little known to content authors, that already achieves this.

This is achieved by using a pure number, which is interpreted as a 
proportion of the current calculated font size (rather than the one
at the time the property was set).  This is almost always the only
safe unit to use, as IE doesn't consider line-height a font sizing
property, so people, like me, who don't like the current vogue for
microscopic type end up with insufficient or negative leading on the
typical web page that sets pixel sizes for both fonts and line height.

Incidentally, if you have lots of font size properties in your style
sheet, the design is suspect.
Received on Monday, 25 April 2005 19:24:56 GMT

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