Skip to content

Commit

Permalink
[CssBaseline] Change body font size to body1 (1rem)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrookes committed Dec 14, 2020
1 parent ea0563f commit 38fe19f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,23 @@ const classes = makeStyles(theme => ({
+<Collapse classes={{ root: 'collapse' }}>
```

### 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/CssBaseline/CssBaseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const scrollBar = {

export const body = (theme) => ({
color: theme.palette.text.primary,
...theme.typography.body2,
...theme.typography.body,
backgroundColor: theme.palette.background.default,
'@media print': {
// Save printer ink.
Expand Down

0 comments on commit 38fe19f

Please sign in to comment.