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

On 7/14/10 5:07 AM, fantasai wrote:
> dbaron noted that anonymous block boxes do need to form a containing block
> to handle the float positioning rules correctly:
> http://www.w3.org/TR/CSS21/visuren.html#float-position

I see.  What about the answer to my other question (about whether 
anything other than percentages depends on the height of the anon block)?

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

> <div style="text-indent: 10%">
> Indented
> <p></p>
> Indented?
> </div>
>
> 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.

Indeed.  That said, should the text be indented in this testcase?

   <div style="text-indent: 100px"><div></div>Indented?</div>

Webkit and IE8 indent that.  Gecko and Prestot.  Per the quoted text it 
seems like they should.  Is that correct?  If so, why is that a 
desirable behavior?  If not, don't we need more wide-ranging changes to 
text-indent?

I'll note that on your proposed testcase, Webkit does NOT indent the 
"Indented?" text, even though it does have an anonymous block there.  I 
haven't looked into why that is, exactly.  Perhaps one of the Webkit 
folks would like to chime in?

IE8 _does_ indent the "Indented?" text in your testcase.  We clearly 
need tests in the test suite for this mess.

-Boris

Received on Wednesday, 14 July 2010 16:01:20 UTC