Comment on The Unreasonable Effectiveness of Simple Websites
qaz@lemmy.world 9 months agoIt did nothing when clicking it the first time and only changed the second time I clicked it
Comment on The Unreasonable Effectiveness of Simple Websites
qaz@lemmy.world 9 months agoIt did nothing when clicking it the first time and only changed the second time I clicked it
snowe@programming.dev 9 months ago
I’ve wondered what this problem was for years but never cared to figure it out, because it always resolved after the first button press (just refresh the page and it all works properly). turns out it is something wrong with my use of local storage to save your theme state. if you don’t have the key in local storage then it does what you mentioned. I just need to switch this to prefers-color-scheme anyway.