[css-grid] Using automatic (instead of min-content) minimums for 'auto' tracks

The Grid spec, for 'auto' sized columns, uses the min-content size of the items
to find the base size of the track. After some discussion, Tab, Rossen, Greg and
I think it makes more sense to use the specified minimum size (via 'min-width'
and 'min-height'). To get sensible behavior by default, we'll honor 'min-size: auto'
as 'min-size: min-content' just like in Flexbox.

This has the following advantages:

   - Allows the author to override the min-content minimum on a per-item basis.
   - This avoids the overflow-related problems with min-content minimums that
     we ran into with Flexbox.
   - Gives grid items behavior consistent with Flexbox.

More precisely (syntax-wise), this would allow 'auto' to be used within the
minmax() function (it's currently forbidden) and have the 'auto' keyword map
to minmax(auto, auto) instead of minmax(min-content, max-content).
   * As a minimum, 'auto' would mean "use the specified minimum size, or if
     that is auto, treat as 0 or min-content per Flexbox rules".
   * As a maximum, 'auto' would mean "use the max-content size".

We've checked in proposed wording on 'min-width/height: auto' at the bottom of:
   http://dev.w3.org/csswg/css-grid/#grid-items
and on 'grid-template-rows/columns: auto' into
   http://dev.w3.org/csswg/css-grid/#track-sizing

(I'm not 100% sure on the implications for items with intrinsic aspect ratios.
Flexbox has special behavior for those, but we might need some Grid-specific
wording on that.)

Thoughts?

~fantasai

Received on Monday, 12 January 2015 20:44:26 UTC