Skip to content

[css-grid-1] Flexible tracks with auto min don't handle min-content constraint sizing #5369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fantasai opened this issue Jul 28, 2020 · 3 comments
Labels
Closed as Retracted When the person who raised the issue thinks that there's no issue after all. css-grid-1

Comments

@fantasai
Copy link
Collaborator

fantasai commented Jul 28, 2020

Follow-up to #4783: Now that the automatic minimum size of items crossing flexible tracks is zeroed out... we are not accounting for their min-content sizes at all when the grid is sized under a min-content constraint.

https://drafts.csswg.org/css-grid-1/#algo-flex-tracks handles max-content constraints in consideration of max-content sizes, but under min-content constraints any flex tracks get sized as zero. Ideally, a grid with one 1fr track should size similarly to a block container, and that analogy fails here.

We may want to consider accommodating min-content sizes of auto-min flex tracks specially somehow.

Note: We don't exactly have interop on this case. See testcase in Chrome vs Firefox.

@Loirooriol
Copy link
Contributor

So you want to change the resolution from #3683?

Wouldn't this already be covered by https://drafts.csswg.org/css-grid/#track-size-intrinsic-min

First increase the base size of tracks with an intrinsic min track sizing function by distributing extra space as needed to accommodate these items’ minimum contributions.
If the grid container is being sized under a min- or max-content constraint, use the items’ limited min-content contributions in place of their minimum contributions here.

Zeroing out the automatic minimum size shouldn't have affected the limited min-content contributions in flex tracks (I hope this will be web compatible).

@Loirooriol
Copy link
Contributor

Your testcase looks like that image in Chromium if I apply my patches for:

  • Handling intrinsic contributions of spanning items with flex tracks
  • Zeroing out the automatic minimum size of spanning items with flex tracks
  • Using the limited min-content contribution instead of the minimum contribution when sizing under a min-content constraint

@fantasai
Copy link
Collaborator Author

So you want to change the resolution from #3683?

No...

Wouldn't this already be covered by https://drafts.csswg.org/css-grid/#track-size-intrinsic-min

I think you're right. Missed that paragraph. :)

@fantasai fantasai added the Closed as Retracted When the person who raised the issue thinks that there's no issue after all. label Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed as Retracted When the person who raised the issue thinks that there's no issue after all. css-grid-1
Projects
None yet
Development

No branches or pull requests

2 participants