-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
docs: move color-mode script #37658
docs: move color-mode script #37658
Conversation
We also need to move that script along with the other scripts. Right now it's being output in |
I think it needs to be that high up to avoid the white flash on page load when in dark mode. Comparing this deploy preview to our staging, this looks broken. |
Weird, I don't see any flash here on Firefox. I also tried it with limited network connection (2G) and I don't get any flash. Which browser are you using? The culprit is probably async loading, but it'd help me if you reverted one by one the patches and saw which one triggers the effect you are seeing. |
I think the async revert fixed it. I definitely saw repeated flashing on my iPhone before that. Will look more when I'm back at a computer. |
Tried it on macOS (Firefox & Chrome - latest versions) with some throttling (2G/3G). Everything is rendered at the same time except the big logo on the main page and the Algolia search bar that are rendered after (but it was OK in terms of UX). |
Doesn't make any sense to have the script before charset and the other tags.
@mdo: Does the order need to be specific? If so, which one is it? Like, does this script need to be before CSS?
Also
DOMContentLoaded
instead ofwindow.load
?