We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26af1d2 commit 7b6cee0Copy full SHA for 7b6cee0
src/theme/index.hbs
@@ -59,6 +59,7 @@
59
<script>
60
var path_to_root = "{{ path_to_root }}";
61
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
62
+ default_theme = default_theme.replace(/\W+/g, '_').toLowerCase();
63
</script>
64
65
<!-- Work around some values being stored in localStorage wrapped in quotes -->
@@ -85,7 +86,7 @@
85
86
var html = document.querySelector('html');
87
html.classList.remove('no-js')
88
try {
- html.classList.remove('{{ default_theme }}');
89
+ html.classList.remove(default_theme);
90
html.classList.add(theme.replace(/\W+/g, '_').toLowerCase());
91
} catch(e) { }
92
html.classList.add('js');
0 commit comments