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

[BUG] Dark-mode screen flicker when opening a new document #91

Open
3 tasks done
poVoq opened this issue Feb 3, 2023 · 2 comments
Open
3 tasks done

[BUG] Dark-mode screen flicker when opening a new document #91

poVoq opened this issue Feb 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@poVoq
Copy link

poVoq commented Feb 3, 2023

I have checked all the prerequisites below and I'm yet experiencing a problem

  • Read the README.md
  • Have the extended version of Hugo installed
  • Used the exampleSite's config.toml as a reference

Describe the bug

When switching between documents in light mode there is a slight screen flicker as if the dark-mode still gets shown for a split second.

When disabling default dark-mode via enableDarkMode = false this switches around to a flicker in dark-mode as if the light-mode was shown for a split second. This is obviously much more jarring on dark-mode and thus more noticeable.

This is easy to reproduce with Firefox even on your hosted documentation version. With Chromium it is less consistent as it seems like even when enableDarkMode = true it flickers sometimes in dark-mode.

Desktop (please complete the following information):

  • Browser: latest Chromium and Firefox
@poVoq poVoq added the bug Something isn't working label Feb 3, 2023
@ltguillaume
Copy link
Contributor

This is deeply annoying when browsing the website.

The cause for this is probably that all JavaScript is bundled and loaded at the end of the page. For this to be solved, there should either be a non-JavaScript solution (see #92) or this bit of JavaScript sould already be run in head or at least at the top of body.

@ltguillaume
Copy link
Contributor

At first, I didn't see the flickering in Firefox-based browsers, but it remained visible on Chromium-based browsers (see 8496fdf#commitcomment-102459533), but I just retested on a slow device and it's still present for both browser engines (Chromium-based browsers are just slower in this particular case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants