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

Re: line-height suggestions and easier alignment

From: Gérard Talbot <www-style@gtalbot.org>
Date: Tue, 10 Jan 2012 10:37:22 -0800
Message-ID: <aad2b55906b1103a1be4bfe4615d1d15.squirrel@gtalbot.org>
To: "Alan Gresley" <alan@css-class.com>
Cc: "Anton Prowse" <prowse@moonhenge.net>, www-style@w3.org

Le Mar 10 janvier 2012 1:12, Alan Gresley a écrit :


> the default value of 'line-height' which is 1.12 times greater
> than the 'font-size'.


This is not always or completely true. It's not clear where such '1.12'
factor value comes from...

Default, initial value of line-height is 'normal' ... which can range from
1.0 to 1.2 according to spec.

    Tells user agents to set the used value to a "reasonable" value based
on the font of the element. The value has the same meaning as
<number>. We recommend a used value for 'normal' between 1.0 to 1.2.
The computed value is 'normal'.

By default, Firefox computes 'normal' as '1.2' while other browsers use '1.0'

Revealing experiments on content box height, vertical-align and
line-height (Ahem font required for examining that page)


  For IE8, line-height: normal is equivalent to line-height: 1.0
  For Firefox 3.6.6, line-height: normal is equivalent to 120px / 100px =
1.2 and not 1.0
  For Opera 10.60, line-height: normal is equivalent to line-height: 1.0
  For Safari 5.0, line-height: normal is equivalent to line-height: 1.0

Gérard (who is very busy today)
CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Tuesday, 10 January 2012 18:40:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:09 UTC