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

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 28 May 2010 08:49:49 -0700
Cc: Andrew Fedoniouk <news@terrainformatica.com>, W3C Emailing list for WWW Style <www-style@w3.org>
Message-Id: <072A35E5-1752-447F-A2AB-BA48B1E4DA2E@gmail.com>
To: Zack Weinberg <zweinberg@mozilla.com>

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 GMT

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