diff --git a/util/gh-pages/index_template.html b/util/gh-pages/index_template.html index 061777809b9e..2fab1f2a2cda 100644 --- a/util/gh-pages/index_template.html +++ b/util/gh-pages/index_template.html @@ -24,7 +24,6 @@ {# #} {# #} {# #} - {# #} {# #} {# #} {# #} diff --git a/util/gh-pages/noscript.css b/util/gh-pages/noscript.css deleted file mode 100644 index 907509ce314a..000000000000 --- a/util/gh-pages/noscript.css +++ /dev/null @@ -1,3 +0,0 @@ -#settings-dropdown, #menu-filters { - display: none; -} diff --git a/util/gh-pages/style.css b/util/gh-pages/style.css index 8c5d64ad4e41..896f2fdac767 100644 --- a/util/gh-pages/style.css +++ b/util/gh-pages/style.css @@ -230,6 +230,11 @@ details[open] { } } +html:not(.js) #settings-dropdown, +html:not(.js)#menu-filters { + display: none; +} + #settings-dropdown { position: absolute; margin: 0.7em; diff --git a/util/gh-pages/theme.js b/util/gh-pages/theme.js index bc296955ddfb..90f57d4469d1 100644 --- a/util/gh-pages/theme.js +++ b/util/gh-pages/theme.js @@ -45,6 +45,10 @@ function setTheme(theme, store) { } (function() { + // This file is loaded first. If so, we add the `js` class on the `` + // element. + document.documentElement.classList.add("js"); + // loading the theme after the initial load const prefersDark = window.matchMedia("(prefers-color-scheme: dark)"); const theme = loadValue("theme");