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

next branch: ThemeSwitch FOUC with SSR #227

Closed
dimfeld opened this issue Feb 3, 2024 · 1 comment
Closed

next branch: ThemeSwitch FOUC with SSR #227

dimfeld opened this issue Feb 3, 2024 · 1 comment

Comments

@dimfeld
Copy link
Contributor

dimfeld commented Feb 3, 2024

ThemeSwitch shows the light mode setting then moves over to dark mode if loading in SSR. This is because the positioning is just using the checked state instead of being keyed on the dark class.

This is a GIF of me refreshing the page three times.

CleanShot 2024-02-02 at 21 07 12

This can probably just be overridden by passing in some custom classes to disable the normal positioning classes and use dark: variant based code instead. I'll make a PR for this soon-ish.

@dimfeld dimfeld changed the title ThemeSwitch FOUC with SSR next branch: ThemeSwitch FOUC with SSR Feb 3, 2024
@techniq
Copy link
Owner

techniq commented Feb 3, 2024

Fixed via #228

@techniq techniq closed this as completed Feb 3, 2024
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

No branches or pull requests

2 participants