Re: [css21] line-height, problem?

Le Lun 26 novembre 2012 14:08, "Gérard Talbot" a écrit :

> "
> 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.
> "
> http://www.w3.org/TR/CSS21/visudet.html#leading
>
> This demo page
>
> http://css-class.com/test/css/text/linebox-line-height-011.html
>
> from Alan Gresley shows that 'line-height: normal' is approximately
> (average) 1.15em for various fonts. The used value of 'line-height:
> normal' depends on the font being used.


I should have been saying instead (because more accurate)
"is approximately (average) 1.15 for various fonts."
numerical value has a different meaning from em value.


2 other points to consider carefully with regards to line box and line
height.

CSS box model (with its padding, border, content, margin areas) have
nothing to do, no direct relationship, no dependence with line-height and
line box height determination: this is often a difficult part to
understand.
Only section 10.6.1 suggests this.

Line-height property has a very different - totally different - meaning
when set on a block element and when set on an inline element: this is
also often misunderstood.
Section 10.8 and other statements elsewhere indicate this.

Gérard
-- 
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 Monday, 26 November 2012 20:16:48 UTC