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 Themes Flash of White BG when using the basePath #242

Open
MaedahBatool opened this issue Dec 14, 2023 · 4 comments
Open

Next Themes Flash of White BG when using the basePath #242

MaedahBatool opened this issue Dec 14, 2023 · 4 comments
Labels
needs information This issue is not actionable until more information is provided

Comments

@MaedahBatool
Copy link

Hi folks, thanks for all the awesome work here.

I'm using the latest next-themes and next but getting a flash of white bg when loading the page for the first time only.

On the homepage there's no flash, but I'm using basePath: '/docs' if I go to localhost:3000/docs or even online in the live prod site, I see an issue only on the basePath URL — https://sourcegraph.com/docs — which makes me wonder if the basePath causes this issue. I have tried building and serving locally, same issue. Only happens on the basePath /docs and doesn't happen on localhost:300/

Help!

@PixeledCode
Copy link

For some reason, the dark class on HTML is being removed and added again during page load. You can notice this more easily if you throttle the load through the Network Tab. Probably implementation issue

@jahirfiquitiva
Copy link

@PixeledCode I'm seeing the same weird behavior 😕

@JackNapolitano
Copy link

as am I

@trm217
Copy link
Collaborator

trm217 commented Apr 23, 2024

@MaedahBatool Did you manage to solve this issue?
Page routing is not used anywhere in next-themes, so I doubt that it has anything to do with the setting. I would assume that the issue is that the loading of the script somehow is deferd.

@trm217 trm217 added the needs information This issue is not actionable until more information is provided label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs information This issue is not actionable until more information is provided
Projects
None yet
Development

No branches or pull requests

5 participants