[css-grid] Set initial growth limits of flexible tracks to infinity · Issue #4313 · w3c/csswg-drafts (original) (raw)
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
- 2. Size tracks to fit non-spanning items only handles non-flexible tracks, so not relevant
- 3. Increase sizes to accommodate spanning items crossing content-sized tracks 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.
- Increase sizes to accommodate spanning items crossing flexible tracks is where we are considering tracks to have an infinite growth limit, which won't be necessary after the change
- 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.