W3C home > Mailing lists > Public > www-style@w3.org > March 2011

Re: line-height limitations

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 17 Mar 2011 07:21:49 -0700
Cc: www-style CSS <www-style@w3.org>
Message-Id: <FBFA843B-E4C4-4D9A-8759-20725C7D462C@gmail.com>
To: David Woolley <forums@david-woolley.me.uk>

On Mar 17, 2011, at 1:01 AM, David Woolley wrote:

> Andrew Fedoniouk wrote:
>>      p { font-size:12pt;
>>          line-height:12pt;
>> If “yes” then why it cannot be used?
> Setting line-height to anything but a pure number tends to cause consecutive lines to overlap when consumers disable font sizes and cap the minimum size.  This is often necessary because authors choose excessively small sizes.

It looks to me like setting line-height to a number is the only case where David's problem exists. When using ems or percent, the first line or first  letter or whatever inherits the length that was set on the block, which is based on the font size of the block. But when using numbers, the number is multiplied by the font size of the pseudo-element.

So in the limited case of David's stated problem, it does not sound like we need a new property. Instead, the problem can be easily solved by using ems for the line-height.

I do still maintain that something is still needed for authors who want to maintain a consistent leading (baseline-to-baseline distance) in spite of varying content heights (like images) and the vertical alignment of inlines. This would also be a good step in the direction of achieving the controlled vertical rhythm of the page that some authors want.
Received on Thursday, 17 March 2011 14:22:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:44 UTC