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

Re: Correct way to define "leading" - compatibility problems

From: Chris Lilley <chris@w3.org>
Date: Mon, 23 Feb 1998 01:31:43 +0100
Message-ID: <34F0C36F.A8E506B9@w3.org>
To: Clive Bruton <clive@typonaut.demon.co.uk>
CC: www-style@w3.org
Clive Bruton wrote:
> I'm a little confused (makes a change!), about leading, or what I suppose
> we should now call linefeed.

I would prefer you called it line height. Line feed is often used for
one of the two popular characters that signal end of line (CR, LF) and
leading has the disadvantage that some people use it to mean line height
and some use it to mean (line-height - font size) which is actually more
accurate. To be super accurate it could be called brassing since my
understanding is that these strips were made of brass not lead. But back
to CSS...
> I seem to have two (at least) solutions for defining leading:
>      { line-height: 1.5em }

> or
>      { font: 1em/1.5em }

That is an incomplete example since the font family is always required.
Also, using the font property always sets all of font-weight,
font-style, font-variant, font-size, line-height and font-family;
properties not explicitly given a value are reset to the initial values
defined in the CSS spec.

So you could say { font: 1em/1.5em Bukinst } for example.

> Is one or other of these obsolete or never reached a recommendation
> stage? 

No they are both in the CSS1 recommendation. It is the same line-height
property that is being set in both cases, just that the second way lets
you set a bunch of properties at once.

>Both seem to give widely varying displays in browsers, from
> correct (or at least what I think should happen), to ignoring the
> setting, to collapsing all the lines between <p></p> tags onto one line!?

Try again with a valid font: aand see what happens. Try different units
(pixels, points, mm, etc). Where bugs exist, report them to the vendor
includin exact browser version and platform.
> Just a couple of other points, "width" for text elements seems to be
> ignored by IE, 

this is not my experience

> as does "em" (when applied to text size) which it seems to
> regard as being 12pt, rather than a multiple of the default text size (as
> Navigator does).

Can you provide a specific test case which we can try out?

Received on Sunday, 22 February 1998 19:37:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:46 UTC