←back to thread

451 points todsacerdoti | 1 comments | | HN request time: 0s | source
Show context
sbinnee ◴[] No.45060391[source]
I always knew that there should be a way to have a button to change light and dark mode on my website without javascript. But I couldn’t figure it out (pre llm era) and gave up and just used javascript. Now it’s time to make an update on that. This blog motivated me.
replies(3): >>45060405 #>>45060700 #>>45062138 #
Sateeshm ◴[] No.45060405[source]
Isn't it just `prefers-color-scheme`
replies(2): >>45060432 #>>45067543 #
1. rebane2001 ◴[] No.45060432[source]
that's the "auto" option, but the comment is taking about adding buttons to switch between the themes too