-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix flickering issues by changing order of meta tags #853
Conversation
This fixes flickering issues when switching pages.
I'm going to mark this as needing replication. I'm +1 on the fix if someone can verify bumping the CSS up in the head does in fact help with the fouc. I'm focusing on html5 writer compatibility currently, but will have some time to review when we have an RC ready. |
Not quite, because that's not the only bit of JS that is being loaded (I'm adding additional JS files as well in my |
I can confirm the flickering issue |
Any chance of this getting merged? |
Moving the CSS above the JS avoids the page load flicker. However the upstream layout doesn't allow overriding this so I've had to pull in the whole layout in order to make the modifications. Ideally this should be fixed upstream but the PR to resolve it has been stuck for some time. readthedocs/sphinx_rtd_theme#853 If this PR is ever merged we should revert back to using the inheritance.
Can also confirm the FOUC issue on Firefox on this project that was built today: https://mixxx.org/manual/latest/ |
@agjohnson as multiple people have now confirmed the issue could this please be reviewed again? |
I can confirm this issue as well |
I noticed that our own documentation, and many other instances of Sphinx documentation using this theme, all exhibited a FOUC when switching pages as the CSS was still being loaded. I opened the HTML files and noticed that the JS files were being loaded first. I'm not sure why; isn't it more important to load the CSS first?
This PR does that by moving the CSS a bit further up so that it can be loaded before the JavaScript needs to run. It fixes the flickering issues I have observed in Firefox.
Also see #847.