Skip to content
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

Feature Request: Define initial value for "dark mode" #2785

Open
certara-mtalley opened this issue Sep 19, 2024 · 0 comments
Open

Feature Request: Define initial value for "dark mode" #2785

certara-mtalley opened this issue Sep 19, 2024 · 0 comments
Labels
front end 🌷 General HTML, CSS, and JS issues

Comments

@certara-mtalley
Copy link

certara-mtalley commented Sep 19, 2024

Apologies if this exists in some capacity, but I have yet to find a simple way to do this or an example of someone else doing this with the new dark mode functionality.

It'd be nice if the YAML for a pkgdown site could explicitly define the dark mode setting it will load with; dark, light, auto. Currently its just light-switch: true.

When running on Chrome & Edge in Windows 11, pkgdown pages load either "light" or "dark" depending on what my systems display settings are (which if this is the default behavior, why not just default to "auto"?). Sites also seem to remember previous settings and load with the last selection. If a page loads on "light", and is changed to "dark" and the page is closed, opening it again will cause it to load "dark". This seems fine, but my selections on someone else's pkgdown site (bslib for example) will also control how my own personal pkgdowns display.

Ideally, I'd like all pkgdown sites for my users to load in "light" mode, regardless of their system settings or any toggling they may have done in another window. If this ability does exist internally, maybe bring attention to it in the customise vignette?

@jayhesselberth jayhesselberth added the front end 🌷 General HTML, CSS, and JS issues label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front end 🌷 General HTML, CSS, and JS issues
Projects
None yet
Development

No branches or pull requests

2 participants