How to switch a theme properly without flashing? #2484
Unanswered
StubbornDeer
asked this question in
Q&A
Replies: 2 comments 3 replies
-
|
@StubbornDeer - as a start, if you haven't already, you could move that second script section into |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Perhaps you need to make sure that light mode explicitly sets Beyond that, not sure. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys,
I started using your library, and it has worked very well so far.
The problem I faced was switching the theme. I see by default you use the query parameter but in my case, it's not acceptable. So, I'm trying to use the simple code to save and restore the value in the local store. Unfortunately, it causes very visible flashing (when it's switched to the dark theme), and if I set up the "light" value by default, the Tabler JS removes it.
Can you please help? Thanks
This is my code for switching theme and for storing/restoring, can you suggest how to fix the flashing?
Beta Was this translation helpful? Give feedback.
All reactions