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

Default font-size of body is 0.875rem when using CssBaseline #18442

Closed
2 tasks done
jim-moody opened this issue Nov 18, 2019 · 3 comments
Closed
2 tasks done

Default font-size of body is 0.875rem when using CssBaseline #18442

jim-moody opened this issue Nov 18, 2019 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@jim-moody
Copy link

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

After upgrading from v3 to v4 of material ui, the font size of our entire application has changed, and the default is now 0.875rem

Expected Behavior 🤔

I would expect that the default font size is 1rem

Steps to Reproduce 🕹

https://codesandbox.io/s/clever-poitras-x70t9

Screen Shot 2019-11-18 at 2 49 09 PM

@oliviertassinari
Copy link
Member

@jim-moody Thanks for the report.
It's a duplicate of #17100.

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Nov 18, 2019
@jim-moody
Copy link
Author

For anyone else that has this problem, I was able to add the following to the theme object as a workaround:

const theme = createMuiTheme({
  typography: {
    body2: {
      fontSize: "1rem"
    }
  }
});

@kildareflare
Copy link

For anyone else who tries the above and it does not work. You need to ensure that CssBaseline is placed after MuiThemeProvider E.g.

 <MuiThemeProvider theme={theme}>
      <CssBaseline />
 </MuiThemeProvider>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants