- From: Alan Gresley <alan@css-class.com>
- Date: Wed, 11 Jan 2012 18:03:52 +1100
- To: www-style@gtalbot.org
- CC: Anton Prowse <prowse@moonhenge.net>, www-style@w3.org
On 11/01/2012 5:37 AM, "Gérard Talbot" wrote: > > 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... I made a mistake (often happens) and this is based on test with Times New Roman. With font-size 100px, 'line-height' is 1.12 times greater than the 'font-size'. With font-size 100px, the default 'line-height' is 1.17 times greater than the 'font-size'. > 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) That's OK Gérard. I haven't even begun testing 'line-height' values using keywords but I do note that with test using Ahem font, the default 'line-height' is equivalent in each browser as if line-height: normal has been used (Firefox being the exception with 1.2). http://css-class.com/test/css/text/linebox-line-height-010.html -- Alan Gresley http://css-3d.org/ http://css-class.com/
Received on Wednesday, 11 January 2012 07:04:27 UTC