From d0e61c8715bc84f5608bdbc739114aa171562a1b Mon Sep 17 00:00:00 2001 From: Anik Bhattacharya Date: Thu, 11 Nov 2021 20:43:26 -0600 Subject: [PATCH] [Breadcrumbs][Divider] Replace decimal spacing values with integers and css calc (#29526) --- .../mui-material/src/Breadcrumbs/BreadcrumbCollapsed.js | 4 ++-- packages/mui-material/src/Divider/Divider.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.js b/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.js index f90cda9baaf7ea..e00ccb7fe52fcc 100644 --- a/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.js +++ b/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.js @@ -7,8 +7,8 @@ import ButtonBase from '../ButtonBase'; const BreadcrumbCollapsedButton = styled(ButtonBase, { skipSx: true })(({ theme }) => ({ display: 'flex', - marginLeft: theme.spacing(0.5), - marginRight: theme.spacing(0.5), + marginLeft: `calc(${theme.spacing(1)} * 0.5)`, + marginRight: `calc(${theme.spacing(1)} * 0.5)`, ...(theme.palette.mode === 'light' ? { backgroundColor: theme.palette.grey[100], color: theme.palette.grey[700] } : { backgroundColor: theme.palette.grey[700], color: theme.palette.grey[100] }), diff --git a/packages/mui-material/src/Divider/Divider.js b/packages/mui-material/src/Divider/Divider.js index 0add3bb967d2f5..c9f94982444edc 100644 --- a/packages/mui-material/src/Divider/Divider.js +++ b/packages/mui-material/src/Divider/Divider.js @@ -155,11 +155,11 @@ const DividerWrapper = styled('span', { }, })(({ theme, ownerState }) => ({ display: 'inline-block', - paddingLeft: theme.spacing(1.2), - paddingRight: theme.spacing(1.2), + paddingLeft: `calc(${theme.spacing(1)} * 1.2)`, + paddingRight: `calc(${theme.spacing(1)} * 1.2)`, ...(ownerState.orientation === 'vertical' && { - paddingTop: theme.spacing(1.2), - paddingBottom: theme.spacing(1.2), + paddingTop: `calc(${theme.spacing(1)} * 1.2)`, + paddingBottom: `calc(${theme.spacing(1)} * 1.2)`, }), }));