Re: [csswg-drafts] [css-grid] Intrinsic size of grid containers (#2303)

> * infinity, if it spans any tracks with an ''grid-template-columns/auto'' or ''grid-template-columns/max-content'' <a>max track sizing function</a>

No need to mention `auto`, because it behaves as `max-content`. And the condition should exclude `max-content` coming from `fit-content`.

> * the sum of the <a lt="fixed sizing function">fixed</a> <a>max track sizing functions</a> of any tracks it spans, if it spans any such tracks.

The `fit-content` argument should be summed here.

> the upper limit [...] is the greatest of

I'm not convinced this is the right approach. Imagine you have an item with a min-content contribution of 25px spanning a track with `minmax(auto,min-content)` and another with `minmax(auto,50px)`. Then the limit will be `max(25px,50px) = 50px`, but in fact it should be `25px+50px = 75px`.

I think it should be more like:
1. Let *x* be the sum of the sizes of the gutters spanned by the item.
1. For each spanned track,
   1. If the max track sizing function is fixed, resolve it as an absolute length and increase *x* by that.
   1. Else, if it's a `fit-content()` track, resolve the argument as an absolute length and increase *x* by that.
   1. Else, if the max track sizing function is `min-content`, increase *x* by the item's min-content contribution.
   1. Else (the max track sizing function is `max-content`), increase *x* by the item's max-content contribution (or infinity since it will be no-op).
1. Use *x* as the upper limit.

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

Received on Thursday, 7 February 2019 19:56:08 UTC