mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 15:04:50 -04:00
Move the dark class up to the html element
To get the correct `color-scheme`. Fixes #2918
This commit is contained in:
parent
074cd1a074
commit
f6449ace34
@ -87,8 +87,8 @@ export function initColorScheme() {
|
||||
|
||||
const toggleDarkMode = function (dark) {
|
||||
if (dark) {
|
||||
document.body.classList.add('dark');
|
||||
document.documentElement.classList.add('dark');
|
||||
} else {
|
||||
document.body.classList.remove('dark');
|
||||
document.documentElement.classList.remove('dark');
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user