Skip to content

Commit

Permalink
[Container] Fix disableGutters style not applied (#24284)
Browse files Browse the repository at this point in the history
  • Loading branch information
povilass authored Jan 6, 2021
1 parent 1b24a94 commit b7df4aa
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/material-ui/src/Container/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,14 @@ const ContainerRoot = experimentalStyled(
marginLeft: 'auto',
boxSizing: 'border-box',
marginRight: 'auto',
paddingLeft: theme.spacing(2),
paddingRight: theme.spacing(2),
display: 'block', // Fix IE11 layout when used with main.
[theme.breakpoints.up('sm')]: {
paddingLeft: theme.spacing(3),
paddingRight: theme.spacing(3),
},
...(styleProps.disableGutters && {
paddingLeft: 0,
paddingRight: 0,
...(!styleProps.disableGutters && {
paddingLeft: theme.spacing(2),
paddingRight: theme.spacing(2),
[theme.breakpoints.up('sm')]: {
paddingLeft: theme.spacing(3),
paddingRight: theme.spacing(3),
},
}),
}),
({ theme, styleProps }) =>
Expand Down

0 comments on commit b7df4aa

Please sign in to comment.