Skip to content

Commit

Permalink
[@mantine/styles] Set color-scheme style in html element (#2808)
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Oct 26, 2022
1 parent 23077af commit 159e2d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mantine-styles/src/theme/GlobalStyles.tsx
Expand Up @@ -10,6 +10,10 @@ export function GlobalStyles({ theme }: { theme: MantineTheme }) {
boxSizing: 'border-box',
},

html: {
colorScheme: theme.colorScheme === 'dark' ? 'dark' : 'light',
},

body: {
...theme.fn.fontStyles(),
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[7] : theme.white,
Expand Down

0 comments on commit 159e2d8

Please sign in to comment.