Skip to content

Commit

Permalink
revert full-width, need emotion first
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 12, 2021
1 parent aa060ec commit 065a948
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions packages/material-ui/src/Grid/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,12 @@ function generateGrid(globalStyles, theme, breakpoint) {
// Keep 7 significant numbers.
const width = `${Math.round((size / 12) * 10e7) / 10e5}%`;

const fullWidths = SPACINGS.reduce((obj, spacing) => {
const themeSpacing = theme.spacing(spacing);

if (themeSpacing === '0px') {
return obj;
}

const fullWidth = `calc(${width} + ${getOffset(themeSpacing)})`;
return {
...obj,
[`&$container$item$spacing-xs-${spacing}`]: {
flexBasis: fullWidth,
maxWidth: fullWidth,
},
};
}, {});

// Close to the bootstrap implementation:
// https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41
styles[key] = {
maxWidth: width,
flexBasis: width,
flexGrow: 0,
...fullWidths,
};
});

Expand Down Expand Up @@ -141,14 +123,14 @@ export const styles = (theme) => ({
'direction-xs-column': {
flexDirection: 'column',
'& > $item': {
maxWidth: 'none !important',
maxWidth: 'none',
},
},
/* Styles applied to the root element if `direction="column-reverse"`. */
'direction-xs-column-reverse': {
flexDirection: 'column-reverse',
'& > $item': {
maxWidth: 'none !important',
maxWidth: 'none',
},
},
/* Styles applied to the root element if `direction="row-reverse"`. */
Expand Down

0 comments on commit 065a948

Please sign in to comment.