Re: [flex-units] unit abbreviations and the flex()

On May 27, 2010, at 11:27 PM, Brad Kemper wrote:

> A { width:calc(1fl + fit-content); } 
> B { width:calc(2fl + fit-content); } 
> 
> In that situation, I expect any leftover space in the flexbox to be distributed to the width of the two boxes (if they are the only two). If the intrinsic widths of A+B is less than the width of the flexbox, then I expect "B" to be twice as wide as "A".

Oops. Actually, I should have said that I expect "B" to be reduced in width at twice the rate of "A". So for every 3px of space that is removed (after A+B fill the flexbox), 2px is removed from "B" and 1px is removed from "A" (the same rate that space was removed earlier, when there was still extra available to contribute to the widths, while the flexbox gets narrower).

> If "A" is filled with lots of small text, then it could wrap. If "B" is a single very large letter, then the "B" might have some overflow. If I didn't want that, and wanted the flexbox to overflow, then I would put min-widths on A and B:
> 
> A, B { min-width:fit-content; }
> 
> That all seems pretty clear. And '- upto(fit-content)' or '- upto(10px)' just seems like a more complicated and unusual way to avoid adding a negative number. There is nothing at all unusual about adding negative numbers.

Received on Friday, 28 May 2010 15:50:26 UTC