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

Re: [css3-flexbox] intuitivity and width computation rules

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Wed, 12 Jan 2011 21:29:45 +0100
Message-ID: <4D2E0F39.1010202@disruptive-innovations.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
Le 12/01/11 19:17, Tab Atkins Jr. a écrit :

> Oh, come now, that's quite an exaggeration.  The problem is very

Not at all.
If the trivial case "three boxes 1/2 1/4 1/4 all same height whatever
the content" cannot be *intuitively* solved, and that's the very first
case *all* designers need and will try (actually "tried" if you read
Jeremie's emails), the module has a serious problem.

> localized and can be fixed (I've been giving it a little thought, as
> it was brought up to me privately earlier).
> The issue is just that the current draft resolves the preferred width
> for elements with ''width: auto'' in horizontal flexboxes as
> 'max-content' (that is, the width of the element's contents if you
> don't take any optional linebreaking opportunities).


> I'm not certain what the correct solution is, nor am I certain that
> there even *is* a correct solution.  Your concrete use-case would help
> here, Daniel.  In the example you give, what do you imagine the
> preferred width should be?  Would it be better to have 'auto' width
> resolve as 'min-content' (take *all* optional linebreaks)?
> If you want elements to absorb space based *purely* on their flex, the
> solution is to set width:0.  The 'width' property sets the preferred
> width, which is used as the base atop which free space is assigned.

Right. But "width: 0" is far from intuitive and readable and I think
the rule should be on the box, not its contents...
I just want something that users (read web authors) will understand
immediately when they read the corresponding css rules.

Received on Wednesday, 12 January 2011 20:30:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:53 UTC