Open Bug 1844184 Opened 2 years ago Updated 2 years ago

[css-grid] Distribute extra space into non-intrinsic tracks instead of going beyond growth limits

Categories

(Core :: Layout: Grid, defect)

defect

Tracking

()

People

(Reporter: mozilla-apprentice, Unassigned)

References

Details

A resolution was made for csswg-drafts/#3648.

[css-grid] Distribute extra space into non-intrinsic tracks instead of going beyond growth limits

  • RESOLVED: Accept edits

Discussion.

This is about a case where a grid has grid-template-columns: minmax(0, 100px) minmax(auto, 100px);, i.e. it spans a track whose sizing function is fixed lengths (no intrinsic sizes) and a track whose sizing function depends on intrinsic sizes. And with that setup, we've got a grid item that spans both tracks, which happens to be larger than 100px (say, 150px).

Previously we would expand the second track to 150px (blowing past its maximum).

This resolution says we should add an additional step, so now we should expand the second track up to its maximum, and then (if necessary) switch to try to expand any spanned fixed-size tracks that haven't yet their maximum (and expand them up to their maximum if needed), and then go back to expanding the intrinsic size track (beyond its maximum if necessary, as we already do).

So that scenario that I described currently ends up with the columns being 0px 150px. And the resolution says we should instead have the columns end up being 50px 100px.

You need to log in before you can comment on or make changes to this bug.