Re: [css-grid] Resolve Intrinsic Track Sizes: min-content vs auto minimums

On 01/07/2016 12:04 PM, Mats Palmgren wrote:
> On 12/10/2015 23:18, fantasai wrote:
>> This is a bug in the spec. :( We've fixed it as follows:
>>   # If the track has an ''auto'' <a>min track sizing function</a>,
>>   # set its <a>base size</a> to the maximum of its items’ “min-size
>>   # contributions”: the value specified by its respective 'min-width'
>>   # or 'min-height' properties (whichever matches the relevant axis)
>>   # if the specified size is ''auto'', or else the item’s <a>min-content
>>   # contribution</a>.
>>
>> Let us know if this is clear, or if there remains any ambiguity
>> or error.
>
> Hmm, so the above change makes Grid chapter 4.4 obsolete, right?
> https://drafts.csswg.org/css-grid/#min-size-auto

No.

> If not, please describe in detail in which situations the spec text
> in 4.4 applies.

In the case that the specified size of the grid item is 'auto',
then the value of 'min-width' will control what its contribution
to the base track size computation is. If 'min-width: auto', then
the grid item contributes its min-content size. If 'min-width' is
something else (e.g. zero) then it contribute that value instead.

If all items in a grid track have 'width: auto; min-width: auto'
then an 'auto' track size will result in the same base track size
as 'min-content'.

If all items in a grid track have 'width: auto; min-width: 0',
then an 'auto' track size will result in a base track size of 0.

Furthermore, 'min-width: auto' items with a specified width less
than their min-content size will be treated as contributing their
specified width to an 'auto' track, not their min-content size.
(If the min-width or track size was min-content, then they would
instead contribute their min-content size.)

~fantasai

Received on Thursday, 21 January 2016 03:30:58 UTC