W3C home > Mailing lists > Public > www-style@w3.org > May 2010

Re: Flexbox Draft, with pictures!

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 25 May 2010 22:14:53 -0700
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-Id: <428E55EC-CC39-412E-A61C-1804FD781CC0@gmail.com>
To: David Hyatt <hyatt@apple.com>

On May 25, 2010, at 6:12 PM, David Hyatt wrote:

> What about supporting child spacing via the border-spacing property and allowing flex on it?
> 
> hbox { display:flex; border-spacing: 1fl 0; }

I like it.

>> (6) In the current spec if I say <img style="box-flex:1">, the image will not be able to shrink below its minimum intrinsic width.  How do I do that with calc? <img style="width: 1fl; min-width: min-intrinsic"> seems pretty nasty for a behavior that should arguably be the default.   I suppose the counterargument is that <iframe style="width:0; box-flex:1"> is more wordy than <iframe style="width:1fl"> though.  If the latter is going to be the more common use case, then forcing min-width and max-width additions to clamp flexing to min-intrinsic and max-intrinsic sizes might be ok.
>> 
>> I don't think that's true.  An img's minimum width is still 0 by
>> default, and so it *should* be able to shrink all the way down to 0.
>> 
> 
> Regardless, I think additive flexing vs. replacement flexing is a key distinction here, and it would be good to make both easy to specify.  Having to do width: calc(fit-to-content + 1fl) just to do the former seems gross.  

Why not this: 

'width:1fl;  min-width: fit-to-content;'

That, at least, is easy to understand. If you didn't set min-width, the width before extra (or missing) space is distributed would be the same as 'fit-to-content'. 

If the 1fl wide box contained up to several lines of text or as little as a single word, then you might want the opposite situation, in which it is flexible up to a point, but should not get super-wide in order to try to fit the intrinsic width. So for that, you could have something like this:

'width:1fl;  max-width: 15em;'

...so that after it becomes 15em wide, any extra space is divided among the other flexers.
Received on Wednesday, 26 May 2010 05:16:31 GMT

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