Re: [RC4] numbers-units-018

On 10/01/2011 5:05 PM, "Gérard Talbot" wrote:
> Hello,
>
> http://test.csswg.org/suites/css2.1/20101210/html4/numbers-units-018.htm
>
> 1-
> <title>CSS Test: Specifying em/ex on the root element</title>
> (...)
>          <meta name="assert" content="Units 'em' and 'ex' refer to the
> initial value of the property when specified on the root element
> of a document.">
>
> There is no property with em or ex specified on the root element in the
> testcase. So, the testcase is not testing what it is declaring to test.


The assert should possibly say,

     "Units 'em' and 'ex' used with offset and margins should allow
      the correct positioning due to the font size of an ancestor
      and/or font size settings of a UA."


> 2-
> The testcase can never fail, regardless of font used. And the font
> family in use is never controlled, so we never can predict the value of
> 30ex as "ex" varies from 1 font family to another.
> This testcase would require Ahem font and to set it on the root element.


The testcase can fail if UAs do not position the black bordered box 
correctly regardless of whatever font is used, regardless of the font 
size settings in a UA and regardless of an OS screen resolution.

With the "em" the left offset and margin-left values (testcase has 30em) 
should correctly position the black bordered box on the right edge of 
the orange box.

With the "ex" the top offset and margin-top values (testcase has 30ex) 
should correctly position the black bordered box on the bottom edge of 
the blue box.

The unit "em" and "ex" are based on the font-size value of it ancestors. 
If no such ancestors exist, then the used size of the "em" and "ex" 
values are base on the default font size of the UA.

<http://www.w3.org/TR/CSS21/syndata.html#length-units>

This case doesn't need Ahem font.


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Monday, 10 January 2011 10:29:24 UTC