From 065a948c1b1b611e754a6a98066be38bc52d0e95 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Tue, 12 Jan 2021 13:29:42 +0100 Subject: [PATCH] revert full-width, need emotion first --- packages/material-ui/src/Grid/Grid.js | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/packages/material-ui/src/Grid/Grid.js b/packages/material-ui/src/Grid/Grid.js index daa51274827d3a..522a513c12b176 100644 --- a/packages/material-ui/src/Grid/Grid.js +++ b/packages/material-ui/src/Grid/Grid.js @@ -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, }; }); @@ -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"`. */