Skip to content

Commit

Permalink
[docs] Improve the CssBaseline description
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jun 11, 2019
1 parent e53e7e5 commit 7a40215
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/src/pages/components/css-baseline/css-baseline.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ which ensures that the declared width of the element is never exceeded due to pa

### Typography

- Font antialiasing is enabled for better display of the Roboto font.
- No base font-size is declared on the `<html>`, but 16px is assumed (the browser default).
You can learn more about the implications of changing the `<html>` default font size in [the theme documentation](/customization/typography/#typography-html-font-size) page.
- Set the `theme.typography.body2` style on the `<body>` element.
- Set the font-weight to "bolder" for the `<b>` and `<strong>` elements.
Bolder is one font weight heavier than the parent element (among the available weights of the font).
- Font antialiasing is enabled for better display of the Roboto font.
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 @@ -20,9 +20,9 @@ const useStyles = makeStyles(
fontWeight: 'bolder',
},
body: {
...theme.typography.body2,
margin: 0, // Remove the margin in all browsers.
color: theme.palette.text.primary,
...theme.typography.body2,
backgroundColor: theme.palette.background.default,
'@media print': {
// Save printer ink.
Expand Down
1 change: 0 additions & 1 deletion packages/material-ui/src/styles/createTypography.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export default function createTypography(palette, typography) {
const coef = fontSize / 14;
const pxToRem = size => `${(size / htmlFontSize) * coef}rem`;
const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({
// color: palette.text.primary,
fontFamily,
fontWeight,
fontSize: pxToRem(size),
Expand Down

0 comments on commit 7a40215

Please sign in to comment.