Skip to content

fix(admin): prevent dark-mode flash on light-preference systems#983

Open
RyansGit wants to merge 1 commit into
litespeedtech:devfrom
RyansGit:fix/admin-dark-mode-flash
Open

fix(admin): prevent dark-mode flash on light-preference systems#983
RyansGit wants to merge 1 commit into
litespeedtech:devfrom
RyansGit:fix/admin-dark-mode-flash

Conversation

@RyansGit

Copy link
Copy Markdown

If a user has set the LiteSpeed admin to light mode but their OS prefers dark, the page briefly flashed dark before the JS toggle ran. The light preference is now mirrored to a cookie so PHP can stamp the correct mode class on the body server-side and the right theme paints on first load.

If a user has set the LiteSpeed admin to light mode but their OS prefers dark,
the page briefly flashed dark before the JS toggle ran. The light preference
is now mirrored to a cookie so PHP can stamp the correct mode class on the
body server-side and the right theme paints on first load.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants