W3C home > Mailing lists > Public > www-style@w3.org > March 2011

Re: [CSS21] Re: Clarification needed for inline boxes containing block boxes

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 14 Mar 2011 11:35:11 -0400
Message-ID: <4D7E35AF.7090204@mit.edu>
To: Peter Moulder <peter.moulder@monash.edu>, www-style@w3.org
On 3/13/11 4:16 PM, Peter Moulder wrote:
> On Sun, Mar 13, 2011 at 02:47:43PM -0400, Boris Zbarsky wrote:
>> For what it's worth, I believe this last case doesn't matter in the
>> sense that the rendering is the same either way...
>
> If "the inline box [is] broken around the block-level box [the first
> one, i.e. prior to this hypothetically separating inline element],
> dividing the inline box into two pieces even if either side is empty",
> and if it's considered clear that the two end boxes each take up a
> line's worth of vertical space

This last part is not clear, in fact.  In Gecko they don't if they have 
nothing in them (where "nothing" can include collapsible whitespace and 
placeholders).

> and have their border area rendered with
> the inline's background&  border

They do, but in this sort of textcase:

   <span>
     <div/>
     <div/>
   </span>

that middle inline ends up with a width of 0 (so the background,top,and 
bottom borders are invisible), and it doesn't render its left/right 
borders, of course.

> What am I missing?

I think the key issue is the vertical space.

> Curiouser and curiouser: in the case of Gecko, such an inline is sometimes
> considered separating and sometimes isn't

"separating" in what sense?

> in the following test case, Gecko
> considers it to be separating where the separating inline has its own border
> (between block3 and block4), but not where it doesn't have its own border
> (between block2 and block3).

That makes sense per the above, no?

> Also of interest is that Gecko doesn't render
> the parent inline's background&  border for non-empty content that separates
> two blocks:

Er... are you testing this in Gecko 1.9.x or something?  If so, don't. 
This section of CSS 2.1 wasn't implemented correctly until early in the 
2.0 cycle; before that all the kids of the inline from the first block 
kid to the last block kid were wrapped in a single anonymous block, with 
the inline broken around that single block.

-Boris
Received on Monday, 14 March 2011 15:35:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:38 GMT