mirror of
https://github.com/apache/superset.git
synced 2026-05-06 16:34:32 +00:00
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:
committed by
GitHub
parent
c4a8b34b11
commit
7bee2afa8e
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user