RE: [css3-gcpm] containing block for top/bottom floats

I agree with where you are going, just want to make a couple observations.

1) when left/right floats say they float to nearest block, what they really mean is they float to wrapping boundaries of horizontal flow. Vertical floats want to float to wherever flow of lines and blocks wraps or paginates.

Perhaps there can be a term of "column-level element" with use similar to "block-level element". It may be a little more complicated since a column is not actually an element, so it could rather be a "column-level block"?

2) FWIW, float:top and float:bottom values probably shouldn't be used to make floats go to top/bottom of a clolumn. That is because these are physical, therefore in vertical text, they mean start/end. But if in vertical text float:left/float:right refer to before/after (logical top/bottom of column), it will be hugely inconvenient for content that is being repurposed from horizontal to vertical layout, or content that is designed to render in both USa that support vertical and older ones that don't.

For exactly that reason IE8 implementation treats left/top and right/bottom as synonyms (actual mapping varies with writing mode).

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Håkon Wium Lie
Sent: Monday, January 05, 2009 11:13 AM
To: MURAKAMI Shinyu
Cc: www-style@w3.org
Subject: Re: [css3-gcpm] containing block for top/bottom floats


Also sprach MURAKAMI Shinyu:

 > >  > Is this top-float floated to the top of the page, or to the top of the
 > >  > table-cell?
 > >
 > > In my mind: top of the table cell.

 > > Is this compatible with your thinking

 > Yes, that's compatible with my thinking and current our implementation.

Great!

 > > (After all, you proposed the
 > > "multi-column" keyword :-)

BTW, should we change the name of the keyword from "multi-column" to
"multicol"? Shorter, and easier to spell.

 > But the description in the GCPM editor's draft seems still insufficient.
 >
 >     top
 >       This keyword indicates that the element is floated to the top of
 >       the containing block. Unless 'top' is combined with 'page' or
 >       'multi-column', the column box will act as containing block for
 >       the purpose of 'float'.
 >
 > The "column box" here should be extended to something not only column
 > box but also table cell, other float, absolute positioned box, etc.

Unless we consider all elements to have a "column box". But the
multicol spec doens't say that, so I guess not.

 > So I wrote:
 > | My proposal:
 > | When the float property value has a vertical keyword (top, bottom) and
 > | has no reference keyword (page, multi-column), the containing block is
 > | formed by the content edge of the nearest box that is a column box or
 > | is a "flow root" defined in the CSS3 basic box model [3] or page area.
 > | In vertical text, a horizontal keyword is vice versa.
 > |
 > | [3] http://www.w3.org/TR/css3-box/#flow-root

"flow root" could be the right term to use. However, wouldn't it make
more sense to change the definition of "flow root" to also include
column boxes?

 > | | A flow root is a box that satisfies at least one of the following:
 > | | - The value of 'float' is not 'none'.
 > | | - The used value of 'overflow' is not 'visible'.
 > | | - The value of 'display' is 'table-cell', 'table-caption',
 > | |   'inline-block' or 'inline-table'.
 > | | - The value of 'position' is neither 'static' nor 'relative'.
 > | | - The value of 'block-progression' is 'lr' or 'rl' and the value of
 > | |   'block-progression' of its parent box is 'tb'
 > | | - The value of 'block-progression' is 'tb' and the value of
 > | |   'block-progression' of its parent box is 'lr' or 'rl'.
 > | | Other modules may define additional flow roots.

So, the multi-column spec could add "column boxes" to the list.

Then we could say:

   page

     This keyword indicates that the page box acts as flow root for
     the element.

   multicol

     This keyword indicates that the multicol element acts as flow
     root for the element.

  Unless 'page' or 'multicol' is specified, the nearest flow root is
  used.

No?

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Monday, 5 January 2009 20:03:44 UTC