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

Option to follow system theme for dark-mode #2256

Closed
2 tasks done
SamAdamDay opened this issue Mar 7, 2024 · 3 comments · Fixed by #2261
Closed
2 tasks done

Option to follow system theme for dark-mode #2256

SamAdamDay opened this issue Mar 7, 2024 · 3 comments · Fixed by #2261

Comments

@SamAdamDay
Copy link
Contributor

Have you checked that your feature request isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my feature request.
  • Yes, I have checked that this feature request isn't already filed.

Description & Motivation

It would be great to have a third option for the dark mode toggle which follows the system theme (prefers-color-scheme: dark). Currently as soon as the user either sets the page theme to dark mode or sets their system to dark mode, this setting is remembered so the theme has to be manually changed if the user later uses a light system theme.

This is a little annoying for me since I change my system theme frequently (dark mode during the night, light mode during the day). In my experience most websites with a dark theme allow following the system theme.

Pitch

A third option for the theme toggle which follows the system theme.

Alternatives

Manually changing theme every time I visit the page.

Additional context

The Numpy docs gives an example of what I'm suggesting: https://numpy.org/doc/1.26/

I'm happy to contribute to a PR for this.

@george-gca
Copy link
Collaborator

I thought about the same solution of numpy site (having a 3rd option there with half icon), but if possible using half sun, half moon icon. Do you know if this is feasible with the free version of font awesome? Also a PR is always welcome.

@SamAdamDay
Copy link
Contributor Author

It looks like there are some good symbols in Font Awesome, but they all require the pro version (e.g. 'moon-over-sun').

image

The half circle symbol is available for free though.

image

I'll try to make a PR in the next few days

@SamAdamDay
Copy link
Contributor Author

I've made a PR for this: #2261

Currently it uses the half-circle symbol, but that can be changed

@george-gca george-gca linked a pull request Mar 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants