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

grommet site flashes white before switching to dark #430

Open
samuelgoff opened this issue Oct 13, 2022 · 0 comments
Open

grommet site flashes white before switching to dark #430

samuelgoff opened this issue Oct 13, 2022 · 0 comments
Labels

Comments

@samuelgoff
Copy link

On a browser that is set to prefer dark mode, the Grommet site flashes white for about a second before turning dark. This is disconcerting to the user and makes the site "feel" slow, because it is waiting for the JS to load, parse, and read window.matchMedia('(prefers-color-scheme: dark)').matches (or auto) rather than simply using SSG CSS prefers-color-scheme media query.

grommet-flash.mov
@jcfilben jcfilben added the bug label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants