Skip to content

Commit 3739b03

Browse files
authored
[theme] Remove theme.typography.round helper (#25914)
1 parent 678e631 commit 3739b03

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ export default function PlainCssPriority() {
158158
+theme.palette.augmentColor({ color: red, name: 'brand' });
159159
```
160160

161+
- The `theme.typography.round` helper was removed because it was no longer used. If you need it, use the function below:
162+
163+
```js
164+
function round(value) {
165+
return Math.round(value * 1e5) / 1e5;
166+
}
167+
```
168+
161169
#### Upgrade helper
162170

163171
For a smoother transition, the `adaptV4Theme` helper allows you to iteratively upgrade some of the theme changes to the new theme structure.

packages/material-ui/src/styles/createTypography.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export default function createTypography(palette, typography) {
7878
{
7979
htmlFontSize,
8080
pxToRem,
81-
round, // TODO v5: remove
8281
fontFamily,
8382
fontSize,
8483
fontWeightLight,

0 commit comments

Comments
 (0)