W3C home > Mailing lists > Public > www-style@w3.org > July 2010

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 14 Jul 2010 02:07:29 -0700
Message-ID: <4C3D7E51.5070600@inkedblade.net>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: www-style list <www-style@w3.org>
On 07/13/2010 11:26 PM, Boris Zbarsky wrote:
> On 7/13/10 5:00 PM, fantasai wrote:
>> Add to section
>> <http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level>:
>> | Anonymous block boxes are ignored when resolving percentage values
>> | that would refer to it: the closest non-anonymous ancestor box is
>> | used instead. For example, if the child of the anonymous block box
>> | inside the DIV above needs to know the height of its containing block
>> | to resolve a percentage height, then it will use the height of the
>> | containing block formed by the DIV, not of the anonymous block box.
>> Because that's the best I can come up with here.
> That wording suggests that the anonymous block box in fact forms a
> containing block. Does it? Why can we not just say that anonymous block
> boxes are not considered when determining the containing block? Is there
> nothing other than percentages that depends on the containing block (or
> more importantly its height, since the content width of the anonymous
> block box is the content width of its parent)?

dbaron noted that anonymous block boxes do need to form a containing block
to handle the float positioning rules correctly:


   # This property specifies the indentation of the first line of text
   # in a block.

<div style="text-indent: 10%">

If we don't want the second half of the <div> indented (and I think we
don't, because e.g. blockquotes or block code in the middle of a
paragraph shouldn't trigger indentation afterward), then it's not even
enough for the anonymous block to not be a containing block. It has to
not exist.

Received on Wednesday, 14 July 2010 09:08:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:48 UTC