W3C home > Mailing lists > Public > public-css-testsuite@w3.org > December 2010

Re: [RC3] containing-block-017 and containing-block-003 not testing what they are supposed to test

From: Alan Gresley <alan@css-class.com>
Date: Fri, 31 Dec 2010 16:46:14 +1100
Message-ID: <4D1D6E26.2060700@css-class.com>
To: Arron Eicholz <Arron.Eicholz@microsoft.com>
CC: "css21testsuite@gtalbot.org" <css21testsuite@gtalbot.org>, "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
On 30/12/2010 5:45 AM, Arron Eicholz wrote:
> On Friday, December 03, 2010 8:08 PM Gérard Talbot wrote:
>> Le Mer 1 décembre 2010 18:27, Arron Eicholz a écrit :

Re: 
<http://test.csswg.org/suites/css2.1/20101027/html4/containing-block-017.htm>

Re: 
<http://test.csswg.org/suites/css2.1/20101027/xhtml1/containing-block-017.xht>

Re: 
<http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_10/containing-block-017.xht>

[snip]
>> Ideally, for testing purposes rigorously, you would also want the outer-
>> parent span (#span1: the intermediary block) to have a width and height and
>> padding box too, in order to really challenge user agents'
>> implementation (on how accurately they figure out/establish the containing
>> block of an absolutely positioned block-level element).
>>
>> The innermost span has top: auto and left: auto; so its top-left position has
>> no relationship with the nearest positioned ancestor element's padding-box.
>>
>> That testcase is definitely not best, not ideal IMO.
>
> Fixed, added padding to intermediary block.
>
> --
> Thanks,
> Arron Eicholz


Arron, what is padding going to do? Change position: absolute to 
position: static.


span span
             {
                 background: blue;
                 height: 1in;
                 position: static;
                 width: 1in;
             }


The only thing that has changed is the height of the <div> which is due 
to the inner most span (blue box) not hovering over the bottom padding 
of the <div>.


Add this to the test.

span span {
	background: blue;
	height: 1in;
	position: absolute;
	width: 1in;
	left: 0; /* add */
	top: 0; /* add */
}

Now is the padding of the div preventing the inner span (blue box) from 
sitting at the top left corner of the div?


The test asserts:

    The containing block is formed by the padding edge
    for block-level elements.


And is based on point 4.1.1 of 10.1 [1] I presume.


   | If the 'direction' is 'ltr', the top and left of the
   | containing block are the top and left padding edges of
   | the first box generated by the ancestor, and the bottom
   | and right are the bottom and right padding edges of the
   | last box of the ancestor.


The test shows currently shows the blue box sitting on the content edge 
of the div, and not the padding edge of the div but then is the div 
inline? No.

Now let me ponder some real world case of this and see what results.


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


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

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Friday, 31 December 2010 05:46:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 31 December 2010 05:47:00 GMT