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

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).

Yes.

> 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.

</Daniel>

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