You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
createTypography is already set up in this this way.
Motivation 🔦
For the same reason that the internal mui createMixins has access to breakpoints/spacing, I think that theme creators should have the same possibilities when creating custom mixins.
Looks like an interesting proposal. However, in order for creating a custom mixin, I would expect you may need more things from the theme (maybe the whole resolved theme actually). My proposal would be doing something like this: https://codesandbox.io/s/sweet-microservice-htiq4r?file=/src/App.tsx
While doing the codesandbox, I noticed that we probably want to export the Mixins type from @mui/material/styles directly, so that developers don't need to know our internals.
Duplicates
Latest version
Summary 💡
Update https://github.com/mui/material-ui/blob/master/packages/mui-material/src/styles/createMixins.js so that it forwards
createMixins
arguments to the "mixinsInput" if passed as a function tocreateTheme
. Suggestion added above.Examples 🌈
material-ui/packages/mui-material/src/styles/createTypography.js
Line 32 in 4eef029
createTypography
is already set up in this this way.Motivation 🔦
For the same reason that the internal mui
createMixins
has access to breakpoints/spacing, I think that theme creators should have the same possibilities when creating custom mixins.For example:
The text was updated successfully, but these errors were encountered: