Correctly check for night mode

This commit is contained in:
Henrik Giesel 2021-04-14 16:56:50 +02:00
parent d6d4269aaf
commit 0133652d04
2 changed files with 2 additions and 4 deletions

View file

@ -35,8 +35,6 @@
</script>
<style lang="scss">
@use "ts/sass/button_mixins" as button;
button {
padding: 0;
}

View file

@ -9,7 +9,6 @@ import { Writable, writable } from "svelte/store";
import EditorToolbarSvelte from "./EditorToolbar.svelte";
import { checkNightMode } from "anki/nightmode";
import { setupI18n, ModuleName } from "anki/i18n";
import "./bootstrap.css";
@ -59,7 +58,8 @@ class EditorToolbar extends HTMLElement {
props: {
buttons: this.buttons,
menus: this.menus,
nightMode: checkNightMode(),
nightMode: document.documentElement.classList.contains("night-mode"),
},
});
});