News for hackers. Stuff that matters.
Re:Show HN: I built a minimal Twitter web app with few rules by WillYouFinish on Monday May 25, 2020 @03:56PM (#23304332)
Pretty neat! I switch between light and dark mode on all of my devices through the day depending on the lightning situation. I'd love to see the web app to switch automatically, too.
Re:Show HN: I built a minimal Twitter web app with few rules by ramkarthikk on Monday May 25, 2020 @04:43PM (#23304764)
This would be interesting to add. I don't use any JavaScript, so I would have to get the user to set their time zone and the time after which they want to switch.
Re:Show HN: I built a minimal Twitter web app with few rules by xwx on Monday May 25, 2020 @05:03PM (#23304963)
The prefers-color-scheme CSS media feature could be a way of doing this without requiring any additional action from the user. The spec is still a draft but it has decent browser support.

https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...