[csswg-drafts] [css-grid] Set initial growth limits of flexible tracks to infinity (#4313)

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-grid] Set initial growth limits of flexible tracks to infinity ==
https://drafts.csswg.org/css-grid/#algo-init says

> - A flexible sizing function
>    Use the track’s initial base size as its initial growth limit.

However, later in https://drafts.csswg.org/css-grid/#algo-spanning-flex-items, we have

> treating flexible tracks as having an infinite growth limit

It would be simpler to just drop the latter and change the former to initialize growth limits to infinity for flexible tracks.

This shouldn't matter in practice:

 - Growth limits are not relevant in [1. Shim baseline-aligned items](https://drafts.csswg.org/css-grid/#algo-baseline-shims)
 - [2. Size tracks to fit non-spanning items](https://drafts.csswg.org/css-grid/#algo-single-span-items) only handles non-flexible tracks, so not relevant
 - [3. Increase sizes to accommodate spanning items crossing content-sized tracks](https://drafts.csswg.org/css-grid/#algo-single-span-items) only handles flexible tracks if they don't have an intrinsic min track sizing function. But if the track doesn't have intrinsic sizes, intrinsic contributions of the items won't be distributed into the track.
   The change could only matter in https://drafts.csswg.org/css-grid/#extra-space because it considers all spanned tracks, not just affected ones:

   > Subtract the corresponding size (base size or growth limit) of every spanned track

    However the change would have no effect because the spec already says

    > For infinite growth limits, substitute the track’s base size.

4. [Increase sizes to accommodate spanning items crossing flexible tracks](https://drafts.csswg.org/css-grid/#algo-spanning-flex-items) is where we are considering tracks to have an infinite growth limit, which won't be necessary after the change
5. https://drafts.csswg.org/css-grid/#algo-finite-growth already sets infinite growth limits to the base size, so the change can't have effects beyond this.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4313 using your GitHub account

Received on Monday, 16 September 2019 04:36:25 UTC