Skip to content

website CSS issue #2105

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

Closed
lorypelli opened this issue Feb 21, 2025 · 1 comment · Fixed by #2110
Closed

website CSS issue #2105

lorypelli opened this issue Feb 21, 2025 · 1 comment · Fixed by #2110

Comments

@lorypelli
Copy link

this happens when you reload for a second:
Image

@philipp-spiess
Copy link
Member

Hey! Can't really reproduce this, does this happen all the time for you?

Gazler added a commit to Gazler/tailwindcss.com that referenced this issue Feb 24, 2025
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 tailwindlabs#2105
philipp-spiess added a commit that referenced this issue Feb 25, 2025
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants