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

[css3-flexbox] intuitivity and width computation rules

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Wed, 12 Jan 2011 11:37:11 +0100
Message-ID: <4D2D8457.7050600@disruptive-innovations.com>
To: www-style list <www-style@w3.org>
I have played a bit with flexbox recently because I wanted
to tweak a bit my editor BlueGriffon and base the current
New Document wizard on CSS3 FlexBox rather than on YUI Grids.

In just a few words: it's *impossible* at this time.

The reason is that the "flexibility" computation, ie the distribution
of remaining space, is done AFTER the computation of the widths of
the flexing elements. If one of these elements increases its width -
for instance a paragraph containing a long text - then the widths
are counter-intuitive and absolutely useless to Web Designers.

Here's a good example:

   http://glazman.org/forCSSWG/flexbox-test.html

(use Firefox4 beta or WebKit)

Nobody - except the CSS WG itself and I'm not even sure - will ever
understand why the paragraphs make the first flexing box of the second
section grow...
But more important, nobody will ever understand what needs to be done
to work around this, i.e. go back to the behaviour all web designers
expect: the first box of the first and second sections should have
same width whatever the content.

I think we have an architectural issue here. Flexbox cannot be
used in the most general case on the Web because of that issue; I'm
close to thinking this module is useless as is.

</Daniel>
--
W3C CSS Working Group, Co-chair
Received on Wednesday, 12 January 2011 10:37:47 GMT

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