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

Add system theme setting #1448

Merged
merged 1 commit into from
Dec 26, 2024
Merged

Add system theme setting #1448

merged 1 commit into from
Dec 26, 2024

Conversation

senekor
Copy link
Contributor

@senekor senekor commented Dec 26, 2024

The system setting is followed if there is no item blog-rust-lang-org-theme in local storage. In order to switch back to the system theme, that item is deleted.

Previously, if a system preference for dark theme was detected, that was additionally stored explicitly as blog-rust-lang-org-theme. That was removed, because it prevents the system setting from being followed if the user switches their system back to light theme.

The system setting is followed if there is no item
`blog-rust-lang-org-theme` in local storage. In order to switch back to
the system theme, that item is deleted.

Previously, if a system preference for dark theme was detected, that
was additionally stored explicitly as `blog-rust-lang-org-theme`.
That was removed, because it prevents the system setting from being
followed if the user switches their system back to light theme.
@senekor senekor mentioned this pull request Dec 26, 2024
@apiraino
Copy link
Contributor

@senekor how does this relates to #1443?

@GuillaumeGomez
Copy link
Member

Code looks good to me, thanks!

@senekor
Copy link
Contributor Author

senekor commented Dec 26, 2024

@senekor how does this relates to #1443?

Ah, I haven't seen that. I wasn't watching the repo, which I probably should. I'm working on a patch right now to remove the flickering entirely, so hopefully that won't be needed anymore.

@GuillaumeGomez
Copy link
Member

They both seem to work together correctly. This one adds the possibility to reset back to "system settings" whereas the other fixes a bug due to script loading order.

@senekor senekor merged commit d23b993 into master Dec 26, 2024
3 checks passed
@senekor senekor deleted the senekor/kyxwqporuzux branch December 26, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants