Skip to content

Commit f3ad2d4

Browse files
committed
[CssBaseline] Change body font size to body1 (1rem)
1 parent ea0563f commit f3ad2d4

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

docs/src/pages/guides/migration-v4/migration-v4.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,23 @@ const classes = makeStyles(theme => ({
418418
+<Collapse classes={{ root: 'collapse' }}>
419419
```
420420

421+
### CssBaseline
422+
423+
- The `body` font size has changed from `theme.typography.body2` (`0.875rem`) to `theme.typography.body1` (`1rem`).
424+
To return to the previous size, you can override it in the theme:
425+
426+
```js
427+
const theme = createMuiTheme({
428+
typography: {
429+
body1: {
430+
fontSize: '0.875rem',
431+
},
432+
},
433+
});
434+
```
435+
436+
(Note that this will also affect use of the Typography component with the default `body1` variant).
437+
421438
### Dialog
422439

423440
- The onE\* transition props were removed. Use TransitionProps instead.

packages/material-ui/src/CssBaseline/CssBaseline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const scrollBar = {
2222

2323
export const body = (theme) => ({
2424
color: theme.palette.text.primary,
25-
...theme.typography.body2,
25+
...theme.typography.body1,
2626
backgroundColor: theme.palette.background.default,
2727
'@media print': {
2828
// Save printer ink.

0 commit comments

Comments
 (0)