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

On 9/29/09 9:54 PM, fantasai wrote:
>> 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. :)

Realistically, the answer is "because that's just the way it's 
implemented absent anything resembling guidance from the spec" as much 
as anything else.

But in any case, it was a semi-rhetorical question.  The real question 
that needs to be answered is "Where does the spec actually say that the 
containing block should be the anonymous table cell in this case, but 
not the anonymous block in the other case?"  The answer to that is 
"nowhere" (for both parts, really), which is a bug in the spec.

-Boris

Received on Wednesday, 30 September 2009 02:18:36 UTC