W3C home > Mailing lists > Public > www-style@w3.org > March 2012

RE: [css3-grid-layout] [css3-layout] fit-content and auto sizes

From: Phil Cupp <pcupp@microsoft.com>
Date: Sat, 10 Mar 2012 05:28:23 +0000
To: Bert Bos <bert@w3.org>, "www-style@w3.org" <www-style@w3.org>, "fantasai (fantasai.lists@inkedblade.net)" <fantasai.lists@inkedblade.net>
Message-ID: <58A081B0F3FA704EAB1082E64639BB010A46BD57@TK5EX14MBXC283.redmond.corp.microsoft.com>
> From: Bert Bos [mailto:bert@w3.org]
> I think we can drop 'fit-content' and just call it 'auto'.

I'm fine using auto, it's what's currently implemented in IE10, however, rereading what fantasai originally wrote I'm not sure I'm getting the distinction between fit-content and minmax(min-content, max-content).

>> From: fantasai [mailto:fantasai.lists@inkedblade.net]
>> That aside, elsewhere  'fit-content' is equivalent to
>>    max(min-content, min(fill-available, max-content))  // shrinkwrap 
>> formula not to
>>    minmax(min-content, max-content)

The minmax(p, q) function means max(p, min(fill-available, q)) doesn't it?  In this case the grid is determining what's available to the track i.e. supplying the fill-available argument to the function.

So what I'm saying is... I think auto works fine, but I'd like us to agree that the reason we're opting to use it instead of fit-content is because auto is shorter to type and not because we believe minmax(min-content, max-content) means something different that max(min-content, min(fill-available, max-content)).

In my mind all these expressions are saying the same thing:

1. Always be at least as big as min
2. Try to grow up to max
3. But stop growing if you run out of space before you get there

-Phil
Received on Saturday, 10 March 2012 05:28:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:51 GMT