Re: [csswg-drafts] [css-grid] Implied Minimum Size of Grid Items

Ok, so Tab and I reviewed this issue and decided to re-evaluate from 
first principles.

Goals:

1. Prevent images/small items from shrinking to nothing in the 
presence of longer content (e.g. paragraphs). *This is the original 
goal of automatic minimum sizes in Flexbox (and now Grid).*
2. Clamp the implied minimum so that we don't overflow the track due 
to the minimum: the goal is really to influence auto tracks, because 
overlapping content is worse than overflowing content. (Also this is 
how flex lines behave.)
3. Avoid cyclic dependencies.

Notes on premises:

  * Potential for cyclic dependency only exists if min track size is 
auto, because otherwise the automatic minimum has no influence on the 
track size.

Proposed changes:
    1. Clarify that the fixed track size clamping is based on the max 
track size, not on the final size of the track. (As far as we can tell
 this was our original intention, just not clearly communicated in the
 latest spec text.)
    2. Specify that `min-width: auto` only resolves to the automatic 
minimum size if the item spans at least one track whose min track size
 is `auto`. It is otherwise zero.

Notes on proposal:
    * Flex tracks in general will honor the automatic minimum because 
flex sizes outside a minmax() function imply an `auto` min track size.
    * If the author specified an explicit minimum track size, we 
always honor that, and if the track is too small for its content, a 
`stretch`ed item shrinks to match and its *content* overflows.
    * The item sizes in rego's latest example would therefore be a) 
40px b) 40x c) 250px.

Let us know if that seems to make sense. Thanks~

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/283#issuecomment-268125974 
using your GitHub account

Received on Tuesday, 20 December 2016 01:16:05 UTC