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

Re: dynamic-top-change-005.htm

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Thu, 29 Sep 2011 21:29:31 -0700
Message-ID: <e2b3dd17a6812ed5dfc49a04391795f8.squirrel@cp3.shieldhost.com>
To: "Robert Hogan" <lists@roberthogan.net>
Cc: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>

Le Jeu 29 septembre 2011 13:25, Robert Hogan a écrit :
> Hi there,
> http://test.csswg.org/suites/css2.1/20110323/html4/dynamic-top-
> change-005.htm


You may want to know that dynamic-top-change-005 has been split in 2
(just in case you're not aware of this):




> This test assumes that a relatively positioned block should offset from
> its
> relatively positioned inline parent.

For relatively positioned boxes, the offset is with respect to the top
edges of the box itself (i.e., the box is given a position in the normal
flow, then offset from that position according to these properties).
Section 9.3.2 Box offsets: 'top', 'right', 'bottom', 'left'

> I've put a reduction of this assumption at:
> https://bugs.webkit.org/attachment.cgi?id=109192
> See also https://bugs.webkit.org/show_bug.cgi?id=53140
> Is the test correct to assume this? Why shouldn't it instead offset from
> its
> nearest containing block, i.e. the 'grandparent'?

Because the offset (for relative positioning) is not relative to the
nearest containing block but to the box itself. Only when percentage
unit is used for relative positioning, then the offset is a percentage
of the containing block's width (for 'left' or 'right') or height (for
'top' and 'bottom').

Anyway, I believe the containing block for div#red is not
div#grandparent and but span#parent ... that is when I read section
9.2.1 and 10.1.

[Addendum: it would be best if you could reuse the same identifiers that
are used in dynamic-top-005 so that we would relate to all testcases the
same way: id="grandparent" is more meaningful in terms of testcase
building logic than id="top" in my opinion]


This is actually explicitly specified in CSS2.1:
"When such an inline box is affected by relative positioning, any
resulting translation also affects the block-level box contained in the
inline box."

Webkit-based browsers currently fail this test:
Block boxes within inline boxes are [also] affected by positioning

regards, Gérard
Contributions to the CSS 2.1 test suite:

CSS 2.1 Test suite RC6, March 23rd 2011

CSS 2.1 test suite harness:
Received on Friday, 30 September 2011 04:30:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:26:55 UTC