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

Site Dark Mode bug #393

Open
Marcloure opened this issue Jun 24, 2020 · 7 comments
Open

Site Dark Mode bug #393

Marcloure opened this issue Jun 24, 2020 · 7 comments
Assignees
Labels
bug Something isn't working site

Comments

@Marcloure
Copy link
Collaborator

Steps to reproduce:

  • Turn on Dark Mode
  • Go to a page (e.g.: Change Log)
  • Hit "Control + Shift + R"

The page will swap to light mode for a moment before loading the black background, but the headers' colors won't change.

@Marcloure Marcloure added the bug Something isn't working label Jun 24, 2020
@mlenser
Copy link
Owner

mlenser commented Jun 24, 2020

The site is staticly generated to be light mode. Meaning the HTML is precompiled. On load the page renders all the html and styling and then injects javascript. That javascript then looks at your local storage for a value and adjusts the site based on that value.
So as a standard way of building the site, that isn't fixable.

However there is a fairly hacky workaround that could work: https://joshwcomeau.com/gatsby/dark-mode and https://github.com/joshwcomeau/dark-mode-minimal

Though it feels like a few hours of work that I don't want to particularly fix at this time for an edge case that only occurs on a full hard refresh.

@mlenser mlenser added the site label Jun 24, 2020
@Marcloure
Copy link
Collaborator Author

It also happens when you update a page.

What I find strange is that the background changes but not the font color. But anyway, I also agree this is low priority.

@mlenser
Copy link
Owner

mlenser commented Jun 25, 2020

It also happens when you update a page.

When I update a page, or when you refresh? Updating a page would be expected as then the cache is cleared. On refresh doesn't seem to happen for m, likely due to some of the offline work I put in.

@Marcloure
Copy link
Collaborator Author

When I update a page, or when you refresh?

When you update. I know it's expected, I was just clarifying.

@mlenser
Copy link
Owner

mlenser commented Jul 2, 2020

I believe this is solved

@mlenser mlenser closed this as completed Jul 2, 2020
@mlenser
Copy link
Owner

mlenser commented Jul 2, 2020

Not fixed

it appears to be ok on mobile where you can't hard refresh, but desktop hard refresh is still broken. It's much less of an issue now (only that first load), but still an issue

@mlenser mlenser reopened this Jul 2, 2020
@mlenser mlenser self-assigned this Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working site
Projects
None yet
Development

No branches or pull requests

2 participants