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

Re: Issue 101 Resolution

From: Anton Prowse <prowse@moonhenge.net>
Date: Wed, 20 Oct 2010 20:05:19 +0200
Message-ID: <4CBF2F5F.5040706@moonhenge.net>
To: www-style list <www-style@w3.org>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Peter Moulder <peter.moulder@monash.edu>
On 20/10/2010 18:05, Tab Atkins Jr. wrote:
> Based on feedback in this thread, I believe that the changes I'm
> proposing for Rules 3 and 7 are correct, except that they should be
> phrased in terms of containing blocks.
>
> Rule 3 Current Text:
> # The right outer edge of a left-floating box may not
> # be to the right of the left outer edge of any
> # right-floating box that is to the right of it.
> # Analogous rules hold for right-floating elements.
>
> Suggested Text:
> | The right outer edge of a left-floating box may not
> | be to the right of the left outer edge of any
> | right-floating box that is to the right of it and
> | whose left outer edge is to the left of the
> | left-floating box's containing block's right outer
> | edge. Analogous rules hold for right-floating elements.

s/right outer edge/right edge/

So you're sanctioning the overlap behaviour shown by most browsers when 
rendering the test case in [1].  Is there some typographical 
justification for that behaviour, or is your decision purely pragmatic? 
  To me it seems kind of anomalous that the left float is allowed to 
overlap the right float and yet the line boxes are still shortened in 
the following test case:

<!DOCTYPE html>
<div style="width:480px">
     <div style="float:right; width:145px; height:50px;
                 background:red"></div>
     <div style="width:300px; border:5px solid blue;">
         <div style="float:left; width:400px; height:150px;
                     background:lime;"></div>
     </div>
     <div style="background:orange;">text text text text</div>
</div>

I think I'd prefer either no overlap or else for the line boxes to not 
be shortened beyond the left float's containing block's right edge.  (In 
the latter case the text would be rendered on a higher painting layer 
than the overflowing float anyway, so it would still be readable.)

[Note that if you put a span around that "text text..." with a 
margin-left:-50px then Gecko gets pretty muddled, so I'm unconvinced 
that codifying current browser behaviour is desirable in and of itself 
given that there are clear implementation bugs here.]


> Rule 7 Current Text:
> # A left-floating box that has another left-floating
> # box to its left may not have its right outer edge
> # to the right of its containing block's right edge.
> # (Loosely: a left float may not stick out at the
> # right edge, unless it is already as far to the left
> # as possible.) An analogous rule holds for
> # right-floating elements.
>
> Suggested text:
> | A left-floating box that has another left-floating
> | box to its left, where the latter box's right edge
> | is to the right of the original left-floating box's
> | containing block's left edge, may not have its right outer
> | edge to the right of its containing block's right
> | edge. (Loosely: a left float may not stick out at
> | the right edge, unless it is already as far to the
> | left as possible.) An analogous rule holds for
> | right-floating elements.

s/original left-floating/former/

I'm happy with this, and I note that the existence of a left float whose 
right edge is *incident* with a later left float's containing block's 
left edge doesn't cause the later left float to drop; this seems very 
reasonable.

[1] http://dbaron.org/css/test/2009/float-outside-tests/rule-3-left

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Wednesday, 20 October 2010 18:06:24 GMT

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