fix(theme): set color-scheme on html to fix dark mode scrollbars (#39704)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Michael S. Molina
2026-04-28 09:17:11 -03:00
committed by GitHub
parent c4a8b34b11
commit 7bee2afa8e

View File

@@ -29,14 +29,20 @@ import '@fontsource/ibm-plex-mono/600.css';
/* eslint-enable import/extensions */
import { css, useTheme, Global } from '@emotion/react';
import { useThemeMode } from './utils/themeUtils';
export const GlobalStyles = () => {
const theme = useTheme();
const isDark = useThemeMode();
return (
<Global
key={`global-${theme.colorLink}`}
styles={css`
// SPA
html {
color-scheme: ${isDark ? 'dark' : 'light'};
}
html,
body,
#app {