You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix color flash on page load when setting dark/light mode (#2110)
Fixes#2112
Previously, when loading the landing page, the page colors would flash
briefly. For light mode the background flashes black before the white
background loads.
For dark mode, the header would flash white, and the text black, before
the correct colors render.
This was happening because the script was being executed after the page
had finished loading, likely due to how the page is packaged into
chunks.
To fix this, the dark mode script is now set inline, so will be part of
the generated HTML.
This fixes#2105
Here's a video showing what was happening before.
https://github.com/user-attachments/assets/2019277f-d947-4289-bf41-89fef7aa3c26
---------
Co-authored-by: Philipp Spiess <hello@philippspiess.com>
0 commit comments