Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CssBaseline] Change body font size to body1 (1rem) #24018

Merged
merged 2 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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).
oliviertassinari marked this conversation as resolved.
Show resolved Hide resolved

### 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.body1,
backgroundColor: theme.palette.background.default,
'@media print': {
// Save printer ink.
Expand Down