W3C home > Mailing lists > Public > www-style@w3.org > November 2012

[css21] line-height, problem?

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 25 Nov 2012 23:21:54 -0800
Message-ID: <CALRQH7_8AAzcX1-SwJtJ2pDKQShZzxpsf6CxNaMAnyDcmQ4zog@mail.gmail.com>
To: www-style@w3.org
This sample:

https://dl.dropbox.com/u/14981836/line-height-test.htm

contains two identical paragraphs, the only difference is that
first one has line-height:normal and second one - line-height:1em;

According to the spec [1]:
   'line-height' specifies the *minimal* height of line boxes within
the element.

If that property defines minimal height then these two paragraphs
should be rendered in the same way. But all browsers I've tried render this
sample with results I cannot interpret. The only exception is IE9, it treats
as if 'line-height' defines max-line-height. That is also against the
spec but at
least the rendering is predictable somehow.

I suspect that I miss something between lines of the spec.
My understanding of the spec wording is this:

used-line-height = max( {normal-line-height}, {defined-line-height} );

I'd appreciate any comments on the subject.

--
Andrew Fedoniouk.

http://terrainformatica.com
Received on Monday, 26 November 2012 07:22:22 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:03 GMT