Skip to content

fix(layout_columns): Use minmax(0, 1fr) for column widths #729

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

gadenbuie
Copy link
Member

@gadenbuie gadenbuie commented Aug 4, 2023

Fixes #727

Background in this CSS tricks article: Preventing a Grid Blowout

Using minmax(0, 1fr) constrains each column to use up to 1fr, otherwise the intrinsic width of one column can affect the sizes of other columns. (See the example in #727 (comment))

Kapture.2023-08-04.at.17.18.24.mp4

@gadenbuie gadenbuie requested a review from cpsievert August 4, 2023 21:40
Copy link
Collaborator

@cpsievert cpsievert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! Please add a news item

@gadenbuie gadenbuie merged commit 1a763b8 into main Aug 7, 2023
@gadenbuie gadenbuie deleted the fix/layout-column-wrap-colwidths branch August 7, 2023 14:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

layout_column_wrap() doesn't force column width
2 participants