-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
customization: themeHigher level theming customizability.Higher level theming customizability.support: questionCommunity support but can be turned into an improvement.Community support but can be turned into an improvement.
Description
Summary
if we want to customize the light/dark palette we can do somehthing like this:
const theme = createTheme({
...otherOptions,
colorSchemes: {
light: {
palette: lightPalette,
},
dark: {
palette: darkPalette,
},
},
});
Then, if we do theme.palette.something.main the color is displayed depending on the mode.
It would be great if this also works for the mixins. That means if we use theme.mixins.something, it should adapt based on the mode (light or dark), instead of using theme.applyStyles for when we want to customize certain styles.
Examples
I expect something like this:
const theme = createTheme({
...otherOptions,
colorSchemes: {
light: {
palette: lightPalette,
mixins: lightMixins,
},
dark: {
palette: darkPalette,
mixins: darkMixins,
},
},
});
Motivation
I want to avoid using too many theme.applyStyles to show one mixin or the other , depending on if we are using light or dark mode.
Search keywords: Dark mode mixins palette
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
customization: themeHigher level theming customizability.Higher level theming customizability.support: questionCommunity support but can be turned into an improvement.Community support but can be turned into an improvement.