W3C home > Mailing lists > Public > www-style@w3.org > September 2008

Re: Suspect CSS2.1 test case

From: Ben Cotterell <ben.cotterell@antplc.com>
Date: Thu, 11 Sep 2008 18:19:22 +0100
To: "L. David Baron" <dbaron@dbaron.org>
CC: www-style@w3.org
Message-ID: <45f3751c943078f7171d2dfafe377f77148ce73b@localhost>

On Thu, Sep 11, 2008 at 09:47:32AM -0700, L. David Baron wrote:
> On Thursday 2008-09-11 17:33 +0100, Ben Cotterell wrote:
> > Then the text "FAIL" goes in, to the right of the first float. Only 1px
> > of the div's background is visible above the second float, so most of
> > the text ends up occupying the same position on the page as the second
> > float.
> 
> Which is the bug that this test is testing, I believe.
> 
> This is a bug in Mozilla:
> https://bugzilla.mozilla.org/show_bug.cgi?id=25888
> and it causes overlap on real pages.

OK, but is this in the CSS 2.1 specification anywhere?

9.4.2 explains that line boxes get narrower when there are floats to the
sides, but there's nothing I can see that says anything like "Line boxes
should never overlap floats that are in their formatting context" (Ian
Hixie's comment in your bugzilla bug).

9.4.2:

"In an inline formatting context, boxes are laid out horizontally, one
after the other, beginning at the top of a containing block."

[...]

In general, the left edge of a line box touches the left edge of its
containing block and the right edge touches the right edge of its
containing block. However, floating boxes may come between the
containing block edge and the line box edge. Thus, although line boxes
in the same inline formatting context generally have the same width
(that of the containing block), they may vary in width if available
horizontal space is reduced due to floats [p. 130].

[...]

When an inline box exceeds the width of a line box, it is split into
several boxes and these boxes are distributed across several line
boxes."

Nothing there about making sure there's enough vertical space for the
line box, or for splitting inline boxes across line boxes in any
circumstances other than because there isn't enough _width_ (not height)
available.

I assumed the whole point giving inline boxes a higher stacking level
than floats was so that in this kind of situation you can still read the
text.

By the way I said in my earlier message that Opera "fails" the test--
that's not true, Opera does move the word FAIL down to below the green
right float.
Received on Thursday, 11 September 2008 17:23:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:12 GMT