Re: [CSS 2.1] [section 9.5 Floats] Empty floated element with a set width but height:0

On Monday 2010-08-09 09:59 -0700, fantasai wrote:
> On 08/07/2010 04:35 PM, Tab Atkins Jr. wrote:
> >On Sat, Aug 7, 2010 at 3:21 AM, Anton Prowse<prowse@moonhenge.net>  wrote:
> >>Again, this is about continuities.  What if the second float's margin
> >>area height were negative?  I'd expect (insist, actually) that it be
> >>ignored for the purposes of line box shortening.  Should it stop being
> >>ignored at zero height, or at positive height?  Positive height seems
> >>the more sensible to me.
> >
> >Are you talking about the case where the float is at the top of the
> >line box, or in the middle?
> >
> >In the "top of line box" situation, it should be treated identically
> >to any other positive-height float that happens to have a bottom
> >margin edge incident with the top edge of the line box.
> >
> >In the "middle of line box" situation, several behaviors seem sensible
> >to me.  We can make it not count when it's zero-height, not count when
> >it's negative height, or just count all the time.
> 
> Making it not count when zero or negative makes the most sense to me.
> It seems odd for negative area take up space.

It just occured to me that this is probably best accomplished by
defining what it means for a line box to be next to a float.  This
is currently undefined.  Defining it would also make it clear what
happens when the float has negative margin-box height.

In other words, we could add a sentence after (maybe immediately
after, maybe a little later):
  # However, line boxes created next to the float are shortened to
  # make room for the margin box of the float.
that says something like:
  # A line box is next to a float when there is a vertical position
  # that is (a) not above the top of the line box, (b) not below the
  # bottom of the line box, (c) below the top margin edge of the
  # float, and (d) above the bottom margin edge of the float.

I intentionally made the line box range inclusive of the edges so
that zero-height line boxes do wrap around floats, but the float
range exclusive of the edges, as discussed in this thread.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Wednesday, 11 August 2010 08:57:25 UTC