Re: Clarification needed for inline boxes containing block boxes

On 02/25/2009 06:46 PM, Boris Zbarsky wrote:
> Consider the following testcase:
>
> data:text/html,<!DOCTYPE html><span style="padding: 0 20px; background:
> green; border: 2px solid red">aaa<div>bbb</div></span>
>
> Note the lack of content inside the <span> after the <div>.
>
> I see the following behavior on this testcase:
> ...
> I see the following behavior:
>
> Gecko: Boxes for the <span> generated both before and after the div.
> Both have 20px left and right padding and both have all 4
> borders.
> Opera 9.6: As before, with the text 'cc' now in the box after the <div>.
> Safari 3.2.1: As Opera for the box before the <div> and as Gecko for
> the box after.
> Webkit trunk from 2009-02-12: As Safari 3.2.
>
> It seems to me that section 9.2.1.1 isn't very clear, since no two UAs
> are doing it the same way. We should probably clarify it somehow... From
> my point of view, Opera's behavior here makes the most sense. I would be
> quite happy to implement it in Gecko.

Proposed text for CSS2.1 Issue 195
   http://wiki.csswg.org/spec/css2.1#issue-195
In section 9.2.1.1
   http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level

append to

   # When an inline box contains an in-flow block box, the inline box
   # (and its inline ancestors within the same line box) are broken
   # around the block.

the following:

   | dividing the inline box into two pieces.

bz, does this seem adequate?

~fantasai

Received on Tuesday, 24 August 2010 01:54:29 UTC