-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Container] Fix mismatch between Container and Toolbar gutters #19505
Conversation
Details of bundle changes.Comparing: 39c8170...15a7c13
|
Why should it match? |
I don't know, maybe it shouldn't, but it looks weird. Without it, the content area inside of the Toolbar is wider than the content area inside of the container. Note, that this mismatch only takes place on screens larger than Here is an example (AppBar > Toolbar at the top, then goes Container right below the AppBar): BeforeAfter |
What do you think of reducing the container padding instead? diff --git a/packages/material-ui/src/Container/Container.js b/packages/material-ui/src/Container/Container.js
index ea24a213b..82716c59c 100644
--- a/packages/material-ui/src/Container/Container.js
+++ b/packages/material-ui/src/Container/Container.js
@@ -17,10 +17,6 @@ export const styles = theme => ({
paddingLeft: theme.spacing(3),
paddingRight: theme.spacing(3),
},
- [theme.breakpoints.up('md')]: {
- paddingLeft: theme.spacing(4),
- paddingRight: theme.spacing(4),
- },
},
/* Styles applied to the root element if `disableGutters={true}`. */
disableGutters: { |
@oliviertassinari that works for me. Just updated the PR. Let's see how the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I don't see a strong use case for making the Container and the Toolbar match, benchmarking (I have looked at Bootstrap, GitHub, Apple, Stripe, and Tailwind), it seems that simplifying the padding logic of the Container is a good direction.
Thanks |
Fixes a mismatch between Container and Toolbar gutters when the screen size is larger than
md
.