Skip to content

Commit

Permalink
[theme] Remove theme.typography.round helper (#25914)
Browse files Browse the repository at this point in the history
  • Loading branch information
m4theushw committed Apr 24, 2021
1 parent 678e631 commit 3739b03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ export default function PlainCssPriority() {
+theme.palette.augmentColor({ color: red, name: 'brand' });
```

- The `theme.typography.round` helper was removed because it was no longer used. If you need it, use the function below:

```js
function round(value) {
return Math.round(value * 1e5) / 1e5;
}
```

#### Upgrade helper

For a smoother transition, the `adaptV4Theme` helper allows you to iteratively upgrade some of the theme changes to the new theme structure.
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 @@ -78,7 +78,6 @@ export default function createTypography(palette, typography) {
{
htmlFontSize,
pxToRem,
round, // TODO v5: remove
fontFamily,
fontSize,
fontWeightLight,
Expand Down

0 comments on commit 3739b03

Please sign in to comment.