Re: [RC4] containing-block-001 not testing what it should

On 14/01/2011 7:01 AM, "Gérard Talbot" wrote:
>
> Le Jeu 13 janvier 2011 4:32, Alan Gresley a écrit :
>> Hello,
>>
>> <http://test.csswg.org/suites/css2.1/20101210/html4/containing-block-001.htm>

>> The assert has,
>>
>>  "If the element's position is 'relative', the containing block
>>   is formed by the content edge of the nearest block-level
>>ancestor box."
>>
>> For this to be true, the test needs a grandchild descendant.
>
>
> Alan,

> The testcase could have been more challenging, a bit more complex to
> really test, verify implementations. (So that testcases have a fair
> chance to reveal, to disclose/identify incorrect implementations.) Say,
> by creating an intermediary static block with some padding area between
> the real containing block (grand-parent) and a relatively positioned
> element (child).

Gérard,

This is possible. It has given me a idea (see bottom of email).


>> I propose
>> this test as a replacement.
>>
>> <http://css-class.com/test/css21testsuite/containing-block-001.htm>
>>
>
> The outermost span in your containing-block-001.htm is an inline element
> and has no padding area... but it's already a more challenging and more
> appropriate testcase.


When I added padding, I got weird results. See the other thread with the 
subject "containing-block-001 additional"


On 14/01/2011 7:23 AM, "Gérard Talbot" wrote:
>
> Le Jeu 13 janvier 2011 12:01, "Gérard Talbot" a écrit :
>
>> The outermost span in your containing-block-001.htm is an inline element
>
> Alan,
>
> I understand now (initially I missed that) why the outermost span (later
> renamed, id-ed "span1" in your additional testcases) is an inline
> element: it furthermore verifies, challenges implementations of rel.
> pos. elements versus their correct containing block. That's excellent.


Regarding the condition of a relative position element being sized by 
it's containing block. A block-level box has to be within a span to meet 
the other condition nearest block-level ancestor box. The later 
condition is really about position and not a size. It really make 10.1 
look a little undefined regarding position relative and containing 
block. There should be test with offset if we are going to test positioning.

Ok, I propose a new test for containing-block-001 which test both sizing 
and positioning together. The good thing about this test is that 
removing position: relative changes the positioning of the green box.


http://css-class.com/test/css21testsuite/containing-block-001d.htm


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

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

Received on Friday, 14 January 2011 02:28:06 UTC