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

Option to disable theme storage or use system value first #140

Closed
saheljalal opened this issue Sep 21, 2022 · 1 comment
Closed

Option to disable theme storage or use system value first #140

saheljalal opened this issue Sep 21, 2022 · 1 comment

Comments

@saheljalal
Copy link

I just thought I ran into a bug on my app because it's night time and in Safari it kept showing light theme. But for some reason on Chrome it was dark.

After numerous hacks and changes, it dawned upon me that the browser was saving my last set theme value and used that on next relaunch.

But I may not necessarily want this behavior, i.e., when I launch my site I just want it to take the system value always first. Then if I toggle the theme, it's just persistent for the session my app is active until I close the tab or browser.

Any chance there is an option that supports disabling local storage or workaround to facilitate my desired behavior?

@pacocoursey
Copy link
Owner

Sounds like a duplicate of #72 (using sessionStorage should achieve your desired behavior)

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

No branches or pull requests

2 participants