- From: Gérard Talbot <css21testsuite@gtalbot.org>
- Date: Mon, 20 Sep 2010 11:23:40 -0700
- To: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
- Cc: "Arron Eicholz" <arron.eicholz@microsoft.com>
Hello, http://test.csswg.org/suites/css2.1/20100917/html4/numbers-units-012.htm There is a number of difficulties with this test. 1- #div1 { font-size: 6ex; } " 'ex' length values refer to the computed font size of the current element. On the 'font-size' property, these length units refer to the computed font size of the parent element. " http://www.w3.org/TR/CSS21/fonts.html#font-size-props The font-size of that enclosing #div1 refers to the parent element, which is, in this case, the browser default or user preferred font-face (since #div1's parent is <body>). We'll say it's "Times New Roman" for Windows-based system for my neighbour and "DejaVu Serif" for my bus driver. It is *not* Ahem font family. Now, in such testcase, the ex unit will be different for my Windows neighbour than for my bus driver. In fact, the exact value of ex wrt font-family in use is impossible to predict because the default font-family in use in browsers is not known. So, #test and the nested div will be displayed with a width and height that is impossible to predict. Again, the testcase is not forcing the ahem font. Proposed solution/code adjustment: ---------------------------------- to create an extra wrapper, enclosing wrapper for the div: this time, this is very much required by the testcase needs. E.g.: <div id="div1"> <div id="test"></div> <div>X</div> </div> into <div id="wrapper-with-ahem-font" <div id="div1"> <div id="test"></div> <div>X</div> </div> </div> 2- A second problem is absence of a specified line-height value for the #div1. line-height: normal can be 1.0 or 1.2. It does make a difference in Firefox 3.6.10 as the height of the nested div is always 1px taller than the #test one. Proposed solution/code adjustment: ---------------------------------- to specify explicitly the line-height. #div1 { font-size: 6ex; line-height: 1; } The same kind of difficulty exists in http://test.csswg.org/suites/css2.1/20100917/html4/numbers-units-013.htm http://test.csswg.org/suites/css2.1/20100917/html4/numbers-units-014.htm and an examination of those testcases in Firefox's DOM inspector will reveal the 1px differential. regards, Gérard -- Contributions to the CSS 2.1 test suite: http://www.gtalbot.org/BrowserBugsSection/css21testsuite/ CSS 2.1 test suite (RC1; September 17th 2010): http://test.csswg.org/suites/css2.1/20100917/html4/toc.html CSS 2.1 test suite contributors: http://test.csswg.org/source/contributors/
Received on Monday, 20 September 2010 18:24:17 UTC