W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2011

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

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Wed, 9 Feb 2011 13:30:56 -0800
Message-ID: <d63c33732fe66bc544a07ee9d9d4ebbd.squirrel@cp3.shieldhost.com>
To: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>
Cc: "Arron Eicholz" <arron.eicholz@microsoft.com>









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:

CSS 2.1 test suite (RC5; January 11th 2011):

CSS 2.1 test suite contributors:
Received on Wednesday, 9 February 2011 21:31:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:17 UTC