-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(theme): Remove light theme by overwriting ThemeProvider
- Loading branch information
1 parent
5d1f136
commit b2ff7b0
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
// Override the default ThemeProvider to completely disable light theme. | ||
--- | ||
{/* This is intentionally inlined to avoid FOUC. */} | ||
<script is:inline> | ||
window.StarlightThemeProvider = (() => { | ||
document.documentElement.dataset.theme = 'dark'; | ||
return { | ||
updatePickers(theme = storedTheme || 'auto') { | ||
// Do nothing as we disable the pickers. | ||
}, | ||
}; | ||
})(); | ||
</script> |