Skip to content

Commit 972b6ce

Browse files
Merge pull request #131 from SantosVilanculos/patch-2
fix: ensure correct color scheme is applied in applyTheme function
2 parents ff5da60 + 268a510 commit 972b6ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

resources/js/hooks/use-appearance.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const applyTheme = (appearance: Appearance) => {
2323
const isDark = appearance === 'dark' || (appearance === 'system' && prefersDark());
2424

2525
document.documentElement.classList.toggle('dark', isDark);
26+
document.documentElement.style.colorScheme = isDark ? 'dark' : 'light';
2627
};
2728

2829
const mediaQuery = () => {

0 commit comments

Comments
 (0)