1
0
mirror of synced 2025-12-25 02:17:36 -05:00

Move data-color-mode up to html (#46075)

This commit is contained in:
Kevin Heis
2023-11-13 14:33:52 -08:00
committed by GitHub
parent 4093a10b70
commit 1e0eb774c6

View File

@@ -31,16 +31,16 @@ export default class MyDocument extends Document {
render() {
return (
<Html>
<Html
// These values are always the SSR rendereding defaults.
// The will get updated later in a useEffect hook, in the client,
// in the MyApp component.
data-color-mode={defaultCSSTheme.colorMode}
data-light-theme={defaultCSSTheme.lightTheme}
data-dark-theme={defaultCSSTheme.darkTheme}
>
<Head />
<body
// These values are always the SSR rendereding defaults.
// The will get updated later in a useEffect hook, in the client,
// in the MyApp component.
data-color-mode={defaultCSSTheme.colorMode}
data-light-theme={defaultCSSTheme.lightTheme}
data-dark-theme={defaultCSSTheme.darkTheme}
>
<body>
<Main />
<NextScript />
</body>