W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Re: [CSS21] Another ambiguity in the definition of "containing block"

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 29 Sep 2009 18:54:44 -0700
Message-ID: <4AC2BA64.3000606@inkedblade.net>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: www-style list <www-style@w3.org>
Boris Zbarsky wrote:
> On 9/27/09 5:14 PM, Boris Zbarsky wrote:
>>> Well, replacing "ancestor" with "ancestor's" may solve it, I think.
>> Not really, no.
> And just to make that clear, what should be the width of the green box 
> in the following testcase?
> <!DOCTYPE html>
> <div style="display: table; width: 300px">
>   <div style="display: table-row;">
>     <div style="display: table-cell; width: 100px">x</div>
>     <div style="width: 50%; height: 100px; background: green">y</div>
>   </div>
> </div>
> It's 100px wide in Gecko, Webkit, Opera 10, and IE8 (though removing the 
> 'x' and 'y' changes the rendering in Opera for reasons that I can't 
> fathom).  So the anonymous table cell is clearly being the containing 
> block in this case.  Why is the anonymous thing the containing block 
> here, but not in the anonymous block case?

I think it's because in the anonymous block case, the anonymous block
is supposed to be effectively invisible, just a concept, like line boxes,
that organizes the layout; but in the case of anonymous table boxes,
we're creating missing boxes that have special behavior; they're not
"transparent" the way anonymous blocks are supposed to be.

Maybe that doesn't make any sense, but I tried. :)

Received on Wednesday, 30 September 2009 01:55:21 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:39 UTC