-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a config option to disable theme toggle buttons to automatically use browser settings #1697
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1697 +/- ##
=========================================
Coverage 99.97% 99.97%
- Complexity 1744 1746 +2
=========================================
Files 181 181
Lines 4663 4665 +2
=========================================
+ Hits 4662 4664 +2
Misses 1 1 ☔ View full report in Codecov by Sentry. |
f4ac556
to
bec8791
Compare
This is a theme toggle button after all, not necessary a dark mode button
d87eb26
to
0cacc81
Compare
Note that if this is enabled for an existing site, if a user has previously used the toggle buttons they may still have a local storage setting that will take precedence. Clearing this would require changing the storage key (which we may want to do in a future release to prefix it with |
71d0f06
to
f449151
Compare
You can now disable the theme toggle buttons by setting
theme_toggle_buttons
tofalse
inconfig/hyde.php
.If the
Feature::Darkmode
setting is disabled in thefeatures
array in the same file, this won't do anything, but if darkmode is enabled setting the theme toggle buttons setting to false they will not show up in the app layout nor the documentation layout; instead the appropriate color scheme will be automatically applied based on the browser system settings.