mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +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 */
|
/* eslint-enable import/extensions */
|
||||||
|
|
||||||
import { css, useTheme, Global } from '@emotion/react';
|
import { css, useTheme, Global } from '@emotion/react';
|
||||||
|
import { useThemeMode } from './utils/themeUtils';
|
||||||
|
|
||||||
export const GlobalStyles = () => {
|
export const GlobalStyles = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const isDark = useThemeMode();
|
||||||
return (
|
return (
|
||||||
<Global
|
<Global
|
||||||
key={`global-${theme.colorLink}`}
|
key={`global-${theme.colorLink}`}
|
||||||
styles={css`
|
styles={css`
|
||||||
// SPA
|
// SPA
|
||||||
|
html {
|
||||||
|
color-scheme: ${isDark ? 'dark' : 'light'};
|
||||||
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body,
|
body,
|
||||||
#app {
|
#app {
|
||||||
|
|||||||
Reference in New Issue
Block a user