From 7a402159e962426e9b9a69208053bb75bda4519f Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Tue, 11 Jun 2019 20:11:03 +0200 Subject: [PATCH] [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),