-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Theme flashing v0.3.0 #281
Comments
cropped_flashing_bug.mp4@pacocoursey here's a reproduction. Any ideas on what this can be? Thank you! |
are you using a custom ThemeProvider component that wraps the next-themes ThemeProvider in a You can directly |
@peteretelej I am not, but thanks for the suggestion. For reference, here's my implementation:
|
Are you using the Content Security Policy (CSP) option? It worked when I turned off the options. |
@lodado I’m not sure if I am, but that seems like something that’s only configurable by a given user at the browser level, and if this is happening for multiple users, it doesn’t seem like an actual fix. Thanks for the suggestion, though, and please correct me if I’m misunderstanding! |
I am experiencing a similar issue with Next Themes. When I deploy my project to production and enable dark mode, the page initially loads in light mode before switching to dark mode after a hard refresh. patelvivek.dev.mp4I have provided the following links for reference: Additional information: I would greatly appreciate any assistance in resolving this issue. |
Exact same issue as in #85 is being seen on v0.3.0. Users have complained that changing from dark mode to light mode causes rapid flashing between the two (as seen in the video above), and the only fix is closing the browser. Sometimes it also occurs randomly - the user doesn't click or interact with anything and all of a sudden the theme starts flashing back and forth. Most of the reports are coming from users who are using the new Arc browser, so perhaps there's some conflict between next-themes' and Arc's implementations.
I haven't been able to reproduce locally, but please see #85 to understand what it looks like. I'm using the
resolvedTheme
variable to determine which theme to show.Usage below:
The text was updated successfully, but these errors were encountered: