From 97268841c7380d7aa19e62653fbe3f9dcbbd28de Mon Sep 17 00:00:00 2001 From: Levi Gunsallus Date: Tue, 11 Jun 2019 00:10:43 -0500 Subject: [PATCH 1/4] Moves body2 spread operator to top of body css --- packages/material-ui/src/CssBaseline/CssBaseline.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/material-ui/src/CssBaseline/CssBaseline.js b/packages/material-ui/src/CssBaseline/CssBaseline.js index 3b4259054daff3..f149a648aa2575 100644 --- a/packages/material-ui/src/CssBaseline/CssBaseline.js +++ b/packages/material-ui/src/CssBaseline/CssBaseline.js @@ -20,9 +20,9 @@ const useStyles = makeStyles( fontWeight: 'bolder', }, body: { - margin: 0, // Remove the margin in all browsers. - color: theme.palette.text.primary, ...theme.typography.body2, + margin: 0, // Remove the margin in all browsers. + color: theme.palette.text.primary, backgroundColor: theme.palette.background.default, '@media print': { // Save printer ink. From 332b57f864e62e80d31e59154ca9672e797d52d7 Mon Sep 17 00:00:00 2001 From: Levi Gunsallus Date: Tue, 11 Jun 2019 00:30:22 -0500 Subject: [PATCH 2/4] Prettier on CssBaseline.js --- packages/material-ui/src/CssBaseline/CssBaseline.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/material-ui/src/CssBaseline/CssBaseline.js b/packages/material-ui/src/CssBaseline/CssBaseline.js index f149a648aa2575..8be54ff385fa6e 100644 --- a/packages/material-ui/src/CssBaseline/CssBaseline.js +++ b/packages/material-ui/src/CssBaseline/CssBaseline.js @@ -21,7 +21,7 @@ const useStyles = makeStyles( }, body: { ...theme.typography.body2, - margin: 0, // Remove the margin in all browsers. + margin: 0, // Remove the margin in all browsers. color: theme.palette.text.primary, backgroundColor: theme.palette.background.default, '@media print': { From e53e7e5e1ebe5b98f52c39f71e7362b3483c4af6 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 11 Jun 2019 08:41:50 +0200 Subject: [PATCH 3/4] Poke netlify From 7a402159e962426e9b9a69208053bb75bda4519f Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Tue, 11 Jun 2019 20:11:03 +0200 Subject: [PATCH 4/4] [docs] Improve the CssBaseline description --- docs/src/pages/components/css-baseline/css-baseline.md | 3 ++- packages/material-ui/src/CssBaseline/CssBaseline.js | 2 +- packages/material-ui/src/styles/createTypography.js | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/pages/components/css-baseline/css-baseline.md b/docs/src/pages/components/css-baseline/css-baseline.md index d6694d5d046bc4..c9d881ccec54e9 100644 --- a/docs/src/pages/components/css-baseline/css-baseline.md +++ b/docs/src/pages/components/css-baseline/css-baseline.md @@ -42,8 +42,9 @@ which ensures that the declared width of the element is never exceeded due to pa ### Typography -- Font antialiasing is enabled for better display of the Roboto font. - No base font-size is declared on the ``, but 16px is assumed (the browser default). You can learn more about the implications of changing the `` default font size in [the theme documentation](/customization/typography/#typography-html-font-size) page. +- Set the `theme.typography.body2` style on the `` element. - Set the font-weight to "bolder" for the `` and `` elements. Bolder is one font weight heavier than the parent element (among the available weights of the font). +- Font antialiasing is enabled for better display of the Roboto font. diff --git a/packages/material-ui/src/CssBaseline/CssBaseline.js b/packages/material-ui/src/CssBaseline/CssBaseline.js index 8be54ff385fa6e..3b4259054daff3 100644 --- a/packages/material-ui/src/CssBaseline/CssBaseline.js +++ b/packages/material-ui/src/CssBaseline/CssBaseline.js @@ -20,9 +20,9 @@ const useStyles = makeStyles( fontWeight: 'bolder', }, body: { - ...theme.typography.body2, margin: 0, // Remove the margin in all browsers. color: theme.palette.text.primary, + ...theme.typography.body2, backgroundColor: theme.palette.background.default, '@media print': { // Save printer ink. diff --git a/packages/material-ui/src/styles/createTypography.js b/packages/material-ui/src/styles/createTypography.js index b5635bb030444c..78b778c74e5a3e 100644 --- a/packages/material-ui/src/styles/createTypography.js +++ b/packages/material-ui/src/styles/createTypography.js @@ -33,7 +33,6 @@ export default function createTypography(palette, typography) { const coef = fontSize / 14; const pxToRem = size => `${(size / htmlFontSize) * coef}rem`; const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({ - // color: palette.text.primary, fontFamily, fontWeight, fontSize: pxToRem(size),