Re: line-height suggestions and easier alignment

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

[snipped]

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

[snipped]

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.

"
normal
    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'.
"
http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height


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)

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/experiments-va-lineheight-02.html


  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
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Tuesday, 10 January 2012 18:40:40 UTC