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

[Bug] SSR 加载闪烁 #4

Open
xuanxuan321 opened this issue Sep 4, 2023 · 1 comment
Open

[Bug] SSR 加载闪烁 #4

xuanxuan321 opened this issue Sep 4, 2023 · 1 comment
Labels
bug Something isn't working Inactive

Comments

@xuanxuan321
Copy link

💻 系统环境 | Operating System

macOS

🌐 浏览器 | Browser

Chrome

🐛 问题描述 | Bug Description

黑暗模式下,每次进入页面的时候,都回会先闪烁一下浅色模式,然后再切换回暗色模式

🚦 期望结果 | Expected Behavior

黑暗模式下,每次进入页面的时候,都不要出现闪烁

📷 复现步骤 | Recurrence Steps

访问这个页面https://dumi-theme.lobehub.com/components/action-icon,然后切换到黑暗模式,刷新页面即可复现

📝 补充信息 | Additional Information

No response

@arvinxx arvinxx added the bug Something isn't working label Sep 4, 2023
@arvinxx
Copy link
Contributor

arvinxx commented Sep 4, 2023

原因是 ssr 渲染只包含了亮色主题,没有暗色主题。因此首先渲染的html是亮色的。等到 js加载完才会变成暗色。这个是目前 cssinjs 遇到的一个问题,正在研究怎么解决。

@lobehubbot lobehubbot changed the title [Bug] [Bug] SSR 加载闪烁 Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Inactive
Projects
None yet
Development

No branches or pull requests

2 participants