Skip to content

Commit

Permalink
fix default getColorSchemeSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Mar 3, 2023
1 parent d930896 commit d12e77b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/mui-joy/src/styles/extendTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,10 @@ export default function extendTheme(themeOptions?: CssVarsThemeOptions): Theme {
theme: this,
});
};
theme.getColorSchemeSelector = () => '&';
theme.getColorSchemeSelector = (colorScheme: SupportedColorScheme) =>
colorScheme === 'light'
? '&'
: `&[data-joy-color-scheme="${colorScheme}"], [data-joy-color-scheme="${colorScheme}"] &`;

const createVariantInput = { getCssVar, palette: theme.colorSchemes.light.palette };
theme.variants = deepmerge(
Expand Down

0 comments on commit d12e77b

Please sign in to comment.