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

【深色模式】dark模式刷新时有明显闪烁 #3066

Open
behappy216 opened this issue Dec 17, 2024 · 1 comment
Open

【深色模式】dark模式刷新时有明显闪烁 #3066

behappy216 opened this issue Dec 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@behappy216
Copy link

behappy216 commented Dec 17, 2024

描述bug
好像每个皮肤都有这个问题,使用暗色模式时刷新,肉眼可见的闪白光,如果服务器配置或网络较差的,闪白光就更明显

期望的正常结果
暗色在加载初期就应该是暗色的

复现步骤
比如作者大佬的这个站,https://www.tangly1024.com/?theme=nobelium ,切换成暗色模式一直刷新,就能很明显感觉到白光

环境

  • 【必填】NotionNext版本 当前最新版本
  • 【必填】主题 几乎都是
  • 【必填】部署方案 vercel
@behappy216 behappy216 added the bug Something isn't working label Dec 17, 2024
@tangly1024 tangly1024 changed the title dark模式刷新时有明显闪烁 【深色模式】dark模式刷新时有明显闪烁 Dec 27, 2024
@tangly1024 tangly1024 added the enhancement New feature or request label Dec 27, 2024
@RylanBot
Copy link
Contributor

应该是 initDarkMode() 延迟造成的问题
可以参考这个解决方案:https://stackoverflow.com/questions/67094919/how-to-fix-dark-mode-background-color-flicker-in-nextjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants