W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [css3-exclusions][css3-gcpm] Reconciling exclusions and floats

From: Håkon Wium Lie <howcome@opera.com>
Date: Wed, 22 Feb 2012 16:09:06 +0100
Message-ID: <20293.1298.425662.696415@gargle.gargle.HOWL>
To: David Hyatt <hyatt@apple.com>
Cc: "www-style@w3.org Style" <www-style@w3.org>
David Hyatt wrote:

 > >   http://dev.w3.org/csswg/css3-gcpm/#the-float-offset-property

 > So conceptually we agree. It's just a question of syntax. You need
 > to be able to position relative to both columns and pages and you
 > also need control over how the child aligns to the containing
 > block. This can be done either with an additional offset like you
 > suggest, or with some kind of syntax that changes the alignment
 > point of the child with the parent.

The current approach in GCPM is simpler. Basically, floats align wrt.
their column. Floats escape their column if 'column-span != none', in
which case they align wrt. the multicol element. There is currently no
way to say that the float should align wrt. the page. If authors would
like to align wrt. the page, they can turn the root element (or <body>
or something) into a multicol element and thereby achive the same
visual effect.

If this solution is deemed too simple, we can introduce explicit
alingment controls:

  float-align: column | element | page

But I'd like to see use cases that cannot be handled with the current
approach first.

 > One viable approach is to add the common cases to the float syntax
 > and hope you get enough coverage. The problem I have with that is
 > just that it feels like we should rally behind one particular
 > positioning scheme and beef it up, rather than keeping these two
 > different positioning schemes (floats and positioning) and having
 > to worry about how to add the same features to both.

Yes. My suggestion would be to build on floats. 

 > >> You could imagine also allowing column based positioning too to do
 > >> floating to the top and bottom of columns.
 > >> 
 > >> #myImage { float: positioned; position: column; top:0 }
 > > 
 > > Yes. This seems identical to:
 > > 
 > >   #myImage { float: top }
 > > 
 > > in GCPM. If you need offsets, you can e.g. use
 > > 
 > >   #myImage { float: top left; float-offset: 10px 10px }
 > > 
 > > I'm not tied to a specific syntax, and using properties/values from
 > > positioning may make sense. But positioning wrt. columns and pages
 > > must be part of a solution.
 > 
 > One issue with the float syntax right now when compared with
 > positioning is that positioning is physical, but float (because of
 > the lack of a top and bottom keyword) is weird and has left/right
 > meaning line-left and line-right. That means right now at least
 > float:left and float:right map to physical top and bottom in
 > vertical text mode. If we did add top and bottom keywords, one of
 > the first things i would want to do is make left/right/top/bottom
 > all be physical and then add logical keywords to represent
 > line-left, line-right, before and after.

Also, there is outside and inside of the page. So, we would have:

  float:
     left | right | top | bottom |           /* physical */
     line-left | line-right |                /* physical once you turn your head to read */
     before | after |                        /* relative to inline direction */
     inside | outside                        /* relative to book binding */

Did we miss any?

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Wednesday, 22 February 2012 15:09:43 GMT

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