Re: Line layout in browsers

On Wed, Jan 23, 2008 at 02:15:58PM -0600, David Hyatt wrote:
> 
> 
> On Jan 23, 2008, at 5:03 AM, Jukka K. Korpela wrote:
> 
> >Anyway, if browsers actually vary the meaning of normal by font, the
> >situation is rather odd:
> 
> They do this.  A value of 'normal' will use a line height that is  
> equal to the line gap + ascent + descent, where all three of those  
> numbers are obtained from the font itself.  Hence my complaint about  
> percentage and numeric line heights being relative to font-size.  The  
> intuitive behavior of 200% or 2 as a line-height value would have been  
> to be twice the value of 'normal.'  It's too late to change this now  
> though.
> 
> I definitely see value in introducing a new unit in order to be able  
> to specify the line-height as a multiple of 'normal.'

Another way to achieve that rather than with a new unit might be with a
new property called "line-spacing", whose value is a number, interpreted
as a multiple of normal line-height. Then you'd say line-spacing applies
only to elements whose computed value of line-height is normal.

-- 
Ben Cotterell
Senior Software Engineer, ANT Software Limited

Received on Thursday, 24 January 2008 15:30:33 UTC