The reason I used localStorage because I didn't know about prefers-color-scheme at the time of writing this post. I will have to try in practice. Hit me up, if you use this new syntax, seems legit as you can define it using media queries. :)
👋 Hey there, I am Waylon Walker
I am a Husband, Father of two beautiful children, Senior Python Developer currently working in the Data Engineering platform space. I am a continuous learner, and sha
I actually think that giving users the ability to change it in local storage like you have is still very good, but adding prefers-color-scheme as the first default would be best.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for reading it Waylon 🙌
The reason I used localStorage because I didn't know about
prefers-color-scheme
at the time of writing this post. I will have to try in practice. Hit me up, if you use this new syntax, seems legit as you can define it using media queries. :)I actually think that giving users the ability to change it in local storage like you have is still very good, but adding
prefers-color-scheme
as the first default would be best.