News for hackers. Stuff that matters.
Re:A Visual Guide to React Mental Models: UseState, UseEffec... by mikewhy on Friday May 29, 2020 @10:43AM (#23350470)
I'm aware of the prefers-color-scheme stuff added to browsers. AFAICT, only Firefox supports setting it at the browser level, while others will inherit from the system.

This would still remove the visitors ability to say "I want THIS SITE to be in light/dark mode", without affecting all other sites / apps on their system. This page could support reading from the browser/OS, while still giving the choice on top of that.

Again, this choice was probably implemented ... to give the user a choice.

Re:A Visual Guide to React Mental Models: UseState, UseEffec... by adrianmsmith on Friday May 29, 2020 @12:41PM (#23352218)
May I ask (genuine question), why would anyone need a choice per site? Surely some people are “light mode” people and want everything in that mode and others are “dark mode” people?
Re:A Visual Guide to React Mental Models: UseState, UseEffec... by mikewhy on Friday May 29, 2020 @01:25PM (#23352814)
Some people are "light mode" people, and some are "dark mode".

Some people may not want everything to be light or dark mode. I am one of them.

Some articles may not work well with dark mode.

Re:A Visual Guide to React Mental Models: UseState, UseEffec... by obedm on Friday May 29, 2020 @01:50PM (#23353166)
As the author of the site, I like switching between the two modes on all websites that support it.

Like someone above said, some sites implement it as an after-thought. In my case, I'm giving more love to dark-more because there are simply more nice color combinations in dark more than with white.

Re:A Visual Guide to React Mental Models: UseState, UseEffec... by mountainboot on Friday May 29, 2020 @01:06PM (#23352558)
Not me, I like both modes. Often I will have one text editor in dark mode and another in light mode.
Re:A Visual Guide to React Mental Models: UseState, UseEffec... by dnissley on Friday May 29, 2020 @01:15PM (#23352682)
Sometimes one implementation or the other just plain sucks -- typically it's bad dark mode implementations that obviously were just afterthoughts.