Re: [css-grid] About the meaning of being "sized under min|max-content constraint"

On 09/21/2015 04:19 PM, Sergio Villar Senin wrote:
> On 19/09/15 00:02, fantasai wrote:
>> On 09/18/2015 08:31 AM, Sergio Villar Senin wrote:
>>> Hi,
>>>
>>> I'd kindly ask the editors to clarify what being sized under
>>> min|max-content constraint exactly means[1] for the track sizing
>>> algorithm. In particular I'd like to know if we're talking about just
>>> the width|height of the grid container or if we should
>>> take a look also to our ancestors to check that (provided the grid has
>>> relative or auto sizes).
>>>
>>> Should we want to extend it to our ancestors then the implementations
>>> might start to suffer from severe performance issues
>>> because we might need some extra layouts. For example if we want to
>>> take into account the values of min|max-width|height
>>> restrictions then we need to layout to know whether we're we satisfy
>>> or not those conditions.
>>
>> It means when you're calculating the min-content/max-content
>> contribution of the grid container, e.g. if the grid container
>> happens to be inside a float (or is itself a float).
>
> Oh, so I had taken it completely wrong. OK, just to be 100% sure,
> you mean that it does not apply for example to the following
> example:
>
> <div style="display: grid; width: min-content;"></div>

It does also apply to this example.

> I was assuming that the above was a grid container sized under
> min-content constraint, but from your answer this is just a grid
> with an indefinite width so the maximize tracks step will grow
> all the tracks to their growth limits. Is that correct?

No, this is also sized under a min-content constraint. The
min-content size is defined to be the minimum size input to
the shrink-to-fit formula, so these two things must be the
same.

~fantasai

Received on Tuesday, 22 September 2015 00:08:30 UTC