@mui/material: incorrect responsiveFontSizes return type when using CssVarsTheme as input #42760
Labels
customization: theme
Centered around the theming features
enhancement
This is not a bug, nor a new feature
good first issue
Great for first contributions. Enable to learn the contribution process.
package: material-ui
Specific to @mui/material
typescript
Steps to reproduce
No response
Current behavior
Expected behavior
responsiveFontSizes
should return the same type of theme that it was givenContext
Switching to the CSS vars theme provider (primarily for dark mode), but still wanting to use the responsive fonts helper.
For now I am simply casting the return type back to
CssVarsTheme
, but the below change topackages/mui-material/src/styles/responsiveFontSizes.d.ts
fixes the issue:Your environment
npx @mui/envinfo
Search keywords: theme, css, responsive
The text was updated successfully, but these errors were encountered: