diff options
author | 2024-01-18 12:51:17 +0800 | |
---|---|---|
committer | 2024-01-18 12:51:17 +0800 | |
commit | f0a5da2bf84818f2ac72b6272ee674bef6e6134c (patch) | |
tree | ac63094209268d2ecf3584f5928c060da38b2b60 /pydis_site/static/js/base | |
parent | Dark: More subtle collapsible and box-shadow borders (diff) |
Optimistic fix for FOUC on initial site load
Diffstat (limited to 'pydis_site/static/js/base')
-rw-r--r-- | pydis_site/static/js/base/themes.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pydis_site/static/js/base/themes.js b/pydis_site/static/js/base/themes.js index fa7b9cf6..f79b759d 100644 --- a/pydis_site/static/js/base/themes.js +++ b/pydis_site/static/js/base/themes.js @@ -3,6 +3,10 @@ const defaultTheme = "light"; const stylesheet = document.getElementById("bulma-css"); +// We include the dark stylesheet in base template to include the rel="preload", +// but remove the actual rel="stylesheet" element here because we won't need it. +document.getElementById("bulma-css-dark").remove(); + // Get saved preference for the site in local storage, optionally accounting // for system preference used when a page loads. function getCurrentTheme(systemPrefers) { |