Skip to content
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

[@mantine/core] Grid: Add auto and content spans #2317

Merged
merged 3 commits into from Sep 8, 2022

Conversation

leeweisberger
Copy link
Contributor

Discussion #2292

Add two additional options for grid columns spans:

Auto
image

Content
image

@@ -31,7 +31,7 @@ Use xs, sm, md, lg, xl values to set spacing from `theme.spacing` or number to s

## Grow

Set `grow` prop on Grid component to force last row take 100% of container width:
Set `grow` prop on Grid component to force all rows to take 100% of container width:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated - this documentation is incorrect. grow affects all rows, not just the last.

Comment on lines +36 to +38
if (colSpan === 'content') {
return 'auto';
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rather than using flex basis content, we're using flex basis auto together with a width of auto to support older browsers

image

@rtivital rtivital merged commit 66386e4 into mantinedev:dev Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants