[RC5] top-offset-001's assert and top-offset-003 wrt containing block

Arron,


http://test.csswg.org/suites/css2.1/20110111/html4/top-offset-001.htm

http://test.csswg.org/suites/css2.1/20110111/xhtml1/top-offset-001.xht

http://test.csswg.org/suites/css2.1/20110111/html4/top-offset-003.htm

http://test.csswg.org/suites/css2.1/20110111/xhtml1/top-offset-003.xht

http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_9/top-offset-001.htm

http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_9/top-offset-001.xht

http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_9/top-offset-003.htm

http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_9/top-offset-003.xht


The assert of top-offset-001 is wrong, incorrect, misleading

        <meta name="assert" content="The 'top' property, for absolute
positioning, specifies the offset of the element in relation to
the containing block's top content edge.">


The top-offset-001 testcase expected results is correct but not its
assert text.

A containing block is not a CSS1 box. A containing block is a concept
for positioning positioned elements. A containing block does *not* have
a padding edge or a padding box or a content edge like a CSS1 box. A
"containing block" is not by itself and by definition a CSS1 box.


Proposed correction (top-offset-001)
------------------------------------

        <meta name="assert" content="The 'top' property, for absolute
positioning, specifies the offset of the element in relation to
the containing block's top edge. The containing block of an
absolutely positioned element is formed by the padding box of
its nearest (closest) positioned ancestor element.">


Proposed correction (top-offset-003)
------------------------------------

        <title>CSS Test: Position 'top' property defines the offset from
the top edge of the containing block</title>





What the tester or web author should understand when examining those
testcases is that containing block is defined differently whether the
positioned element is relatively positioned (with absolute unit or with
%tage value) or absolutely positioned or etc... according to section
10.1 [1]. What are the rules in how the containing block is defined and
what are the width and height dimensions of a containing block of an
element (wrt the containment hierarchy) is defined in section 10.1 [1]
and such rules and logic vary.

[Addendum: my proposed corrections could still be better worded; I lack
time right now. I also think section 10.1 bullet 4 [1] could be reworded
better, clarified.]

[1]: http://www.w3.org/TR/CSS21/visudet.html#containing-block-details

Gérard Talbot
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 test suite (RC5; January 11th 2011):
http://test.csswg.org/suites/css2.1/20110111/html4/toc.html

CSS 2.1 test suite contributors:
http://test.csswg.org/source/contributors/

Received on Wednesday, 9 February 2011 21:31:31 UTC