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

RE: Advanced Floats

From: Rossen Atanassov <ratan@windows.microsoft.com>
Date: Wed, 2 Jan 2008 17:18:22 -0800
To: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <6607C4545FAB804B97733F82D20E0D0844AB08FE55@NA-EXMSG-W602.wingroup.windeploy.ntdev.microsoft.com>

" When talking about implementability, one key thing to keep in mind is
that absolute positioning can position things anywhere inside their
container *because* those things don't affect the size of the container."

I'd like to clear one of your statements bellow. When the container has fixed size with overflow: scroll | auto, absolutely positioned elements will in fact change the size of the containing block (according to http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow).

As for floats, the need for float: top | bottom is quite more important than center for scripts in vertical layout. At this time it is hard for designers that work with Japanese or Chinese languages (and any other vertical script for that matter) to position floats as naturally as we could in LTR or RTL. I see that both TOP and BOTTOM have been defined for paginated scenarios but I don't see the same for bottomless pages, is this something which is being currently considered?

Thanks,
Rossen Atanassov


-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of fantasai
Sent: Wednesday, January 02, 2008 4:25 PM
To: www-style@w3.org
Subject: Advanced Floats


James Elmore wrote:
>
> This is one reason why I prefer to separate the ability to 'float' an
> element into a position and the ability to flow (or 'wrap') elements
> around the 'floated' element. There are already some good, well
> documented, reasonably complete, and even implemented ways to position
> elements. What is lacking is the ability to make other elements move
> around them as a 'float' does. Why make 'float' more complex when it
> could just be a shorthand way of saying 'position: absolute left; flow:
> right;'. (If I got the syntax wrong, I apologize; I just wanted to point
> out that 'float' is doing two things, and it should be possible to
> handle the two different things separately, as well as the shorter
> 'float: left;')

When talking about implementability, one key thing to keep in mind is
that absolute positioning can position things anywhere inside their
container *because* those things don't affect the size of the container.
This is not the case with floats: since they affect the content, they
can affect the size of the container. You can't define a new feature
as "just mix floats and absolute positioning". It creates a circular
dependency.

I agree with Peter Moulder's points about the cost vs. gain for a
"float: center" feature. I don't think we will add it to CSS. I'm not
speaking for the Working Group when I say this, but I very, very much
doubt that we will find the cost of implementing "float: center" worth
the dubious benefit of adding it to the feature list.

However, this isn't to say that more powerful floats aren't something
we'd like to consider. James Elmore posted a list including some other
seriously useful cases we should consider:
   http://lists.w3.org/Archives/Public/www-style/2007Dec/0272.html

Håkon has already started experimenting with ideas for more powerful
floats, particularly in relation to paged media:
   http://www.w3.org/TR/css3-gcpm/#page-floats

If we want to extend something like this to containing blocks other than
the page, note that floating to the top of a box is relatively
straightforward (although it requires a second layout loop), but floating
to the bottom only works without an iterative balancing algorithm if the
containing block is a fixed height.

I think this topic deserves more discussion, but we need to keep in
mind that defining new CSS layout features is more than just evaluating
syntax.

~fantasai
Received on Thursday, 3 January 2008 01:18:36 GMT

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