langurmonkey/website-source
1
2
Fork
You've already forked website-source
1

fix light/dark mode #2

Closed
jothi-prasath wants to merge 601 commits from (deleted):master into master
pull from: (deleted):master
merge into: langurmonkey:master
langurmonkey:master
langurmonkey:pages
First-time contributor
Copy link

i defaults to dark mode when page loads instead of light mode which avoids wired splash of white colors at page load

i defaults to dark mode when page loads instead of light mode which avoids wired splash of white colors at page load

I don't really see the issue. There is no splash of white once the site (and the js) is cached. Changing the default theme to dark does the opposite if the user prefers light mode, i.e., they will get a splash of dark (the first time only).

I don't really see the issue. There is no splash of white once the site (and the js) is cached. Changing the default theme to dark does the opposite if the user prefers light mode, i.e., they will get a splash of dark (the first time only).
Author
First-time contributor
Copy link

my perspective on the issue is if a user first time enters into the site obviously they are using dark mode by default here the splash of white is a thing because there is no cache so the white splash is noticeable. And if the user wants to switch to light mode, already .js files are cached so the splash of dark is doesn't seem to be noticed.

my perspective on the issue is if a user first time enters into the site obviously they are using dark mode by default here the splash of white is a thing because there is no cache so the white splash is noticeable. And if the user wants to switch to light mode, already .js files are cached so the splash of dark is doesn't seem to be noticed.

Well, the default theme is light, not dark. Anyway, I have fixed the root cause of the issue. That is, separating the javascript code that applies the theme from the site-bundle.js and loading it at the top of the body. Flickering should be gone now. See b797654c.

Well, the default theme is light, not dark. Anyway, I have fixed the root cause of the issue. That is, separating the javascript code that applies the theme from the site-bundle.js and loading it at the top of the body. Flickering should be gone now. See b797654c.

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
langurmonkey/website-source!2
Reference in a new issue
langurmonkey/website-source
No description provided.
Delete branch "(deleted):master"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?