From f3ad2d4589596e12f803725290cf95a9438d8da8 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 14 Dec 2020 21:22:06 +0000 Subject: [PATCH] [CssBaseline] Change body font size to body1 (1rem) --- .../pages/guides/migration-v4/migration-v4.md | 17 +++++++++++++++++ .../material-ui/src/CssBaseline/CssBaseline.js | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/src/pages/guides/migration-v4/migration-v4.md b/docs/src/pages/guides/migration-v4/migration-v4.md index bfff5eb3ac0875..9e27ed3fa40144 100644 --- a/docs/src/pages/guides/migration-v4/migration-v4.md +++ b/docs/src/pages/guides/migration-v4/migration-v4.md @@ -418,6 +418,23 @@ const classes = makeStyles(theme => ({ + ``` +### CssBaseline + +- The `body` font size has changed from `theme.typography.body2` (`0.875rem`) to `theme.typography.body1` (`1rem`). + To return to the previous size, you can override it in the theme: + + ```js + const theme = createMuiTheme({ + typography: { + body1: { + fontSize: '0.875rem', + }, + }, + }); + ``` + +(Note that this will also affect use of the Typography component with the default `body1` variant). + ### Dialog - The onE\* transition props were removed. Use TransitionProps instead. diff --git a/packages/material-ui/src/CssBaseline/CssBaseline.js b/packages/material-ui/src/CssBaseline/CssBaseline.js index eb9a0eaa91b38e..e9736023b420be 100644 --- a/packages/material-ui/src/CssBaseline/CssBaseline.js +++ b/packages/material-ui/src/CssBaseline/CssBaseline.js @@ -22,7 +22,7 @@ const scrollBar = { export const body = (theme) => ({ color: theme.palette.text.primary, - ...theme.typography.body2, + ...theme.typography.body1, backgroundColor: theme.palette.background.default, '@media print': { // Save printer ink.