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

feat(web): use system theme until user toggles site theme #479

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

sruenwg
Copy link
Collaborator

@sruenwg sruenwg commented Jul 13, 2024

Closes #134.

What this PR solves / how to test:
This PR makes it so the site is displayed in the user's preferred color scheme (as set in prefers-color-scheme) until the user interacts with the theme toggle button to explicitly set the site theme.

Note that this is slightly different from the behavior described in #134, but I feel this is less awkward than fixing the color scheme to the one used by the user on their first visit.

spodule-system-color-scheme-init.mp4

@sruenwg sruenwg requested a review from sugar-cat7 as a code owner July 13, 2024 02:38
Copy link

vercel bot commented Jul 13, 2024

@sruenwg is attempting to deploy a commit to the sugar-cat7's Team Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Jul 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
vspo-schedule ✅ Ready (Inspect) Visit Preview Jul 13, 2024 3:38am

Copy link
Owner

@sugar-cat7 sugar-cat7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM🙆‍♀️

@sruenwg sruenwg merged commit 8c2744e into sugar-cat7:main Jul 13, 2024
4 checks passed
@sruenwg sruenwg deleted the auto-select-color-scheme branch July 13, 2024 12:40
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.

🚀 Feature Request:Auto-select user's preferred color scheme on initial load
2 participants