1. 69
    Dark Mode meta

The idea of a dark mode for lobsters has been brought up in the past:

The recommended solution has generally been to use a user style. That’s a great solution for desktop users, given you trust the Stylus extension. However, it leaves mobile browsers without any options. Now, given that both iOS and Android have implemented OS-level dark modes, it seems like a feature worth adding to the site.

This could be done seamlessly using the prefers-color-scheme CSS feature; both Android and iOS browsers support this feature. A boolean setting could be added to the user profile page as a fallback option.

As for the design of the scheme, it might be enough to integrate an existing popular user style into the site.

Is this a feature you would appreciate if it was implemented?

  1. 32

    The prefers-color-scheme approach seems totally reasonable to me. I don’t prefer dark mode, personally, but I’d happily vote to add that as an option for people who do.

    1. 14

      I agree. lobste.rs design is also simple enough to be a good showcase for the feature.

      1. 2

        I completely agree with this, most of the time I prefer having a light colour theme but every now and then I have a sleepless night and want to browse on my phone for a bit, I’ve set up most of my apps and iOS to automatically change to dark color theme after 22:00, with the OLED displays in the newer iPhone models the difference is remarkable to a degree where I actually prefer the dark theme to the light for late night reading. In all other cases I much rather have the light scheme.

        Lobsters is currently the only site/source I regularly read which doesn’t support any such adaption. Some apps and sites require manually changing the theme though which is a hassle, most elegant is the ones that just follow the schedule I’ve set for nightshift and dark mode in the phone.

        This is coming from someone who uses light color schemes in my IDE and terminal even with the frequent backlash from my peers.

      2. 12

        If you want to know whether your browser+OS combo would support this: prefers-color-scheme.bejarano.io

        What a coincidence, I wrote it this Wednesday!

        1. 8

          Since this is a rather practical problem, I think this would be better discussed as a GitHub pull request? Personally, I’d have no issue, and I guess if you come with the patch, most wouldn’t either.

          1. 17

            In a reply to the first GitHub issue opened about this topic, it was stated that this should be a meta thread on the site rather than a GitHub issue.

            1. 1

              Oh, never mind then.

          2. 11

            Mobile Firefox has plugins.

            1. 6

              Yes, for example, https://darkreader.org/ on mobile Firefox works like a charm for most pages, not only lobste.rs

              1. 0

                iOS/iPadOS Safari doesn’t have plugins that can do that. Saying the user should be able to modify the website to view it as they want is a nice buzzword, but doesn’t actually pan out in reality. iOS/iPadOS LITERALLY DOES NOT ALLOW YOU TO DO THAT. That is not a solution. Let’s focus on actual solutions instead of elitist buzzwords please.

                1. 9

                  Responding with an honest-to-machine-code option to the statement

                  However, it leaves mobile browsers without any options.

                  is neither elitist nor particularly buzzwordy, but a very legitimate addition to the discussion.

                  1. 3

                    Honestly if it was a more broader discussion of dark mode, for sure, but when it’s a proposal to add code that supports dark mode to the website, it’s not really useful. People use iOS, others might prefer Chrome, Safari, etc. I get where you’re coming from, but there’s nothing reasonably actionable emerging from the statement, which itself is pretty hit and run - “Mobile Firefox has plugins” is pretty glib, all told.

                  2. 4

                    You can’t use Firefox on iOS?

                    1. 11

                      Apple doesn’t let third party browsers use their own engines.

                      1. 10

                        That’s crazy

                    2. 3

                      iOS has a feature called “Smart Invert Colors.” On my iPhone 8, I configured triple clicking the home button to enable/disable it. Works great in Mobile Safari, and Lobste.rs looks fantastic in that mode.

                      1. 1

                        Presumably it just inverts the colors of everything except for images?

                        1. 1

                          That is correct.

                      2. 1

                        With very few exceptions, most people chose to get an iPhone. This seems like a “them” problem, and isn’t elitist to push back on at all.

                    3. 5

                      Yes please! This is one of the changes to the modern web I am most excited about - giving users better user interface without requiring explicit configuration. This is the good stuff.

                      1. 4

                        Hello. Just these days I’m implementing a dark mode for gambe.ro, so basically on the same CSS of Lobste.rs. Even after the fork, there hasn’t been much change that I know of.

                        I’m using a different technique though, with a switch and a set of CSS variables. I don’t know if that’s the right way to go then and thank you for posting this so I will reconsider my options.

                        If anybody is curious: https://github.com/gambe-ro/lobsters/tree/night_mode

                        1. 4

                          Thumbs up for this feature. It’s a site that really doesn’t need an app, which I love, but it’d be nice to get some of the niceties, such as dark mode.

                          Thanks for exposing me to https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme by the way; I just did the job on my own site in fairly short order

                          1. 1

                            Thank you for that! As someone who has a strong preference for dark mode everywhere I’m grateful to those taking advantage of the new CSS standards.

                          2. 3

                            My comment is strictly speaking not about Lobsters itself, but I urge caution to readers about dark mode. It may not be as good for your eyes as you think. Check out https://www.quora.com/Is-a-dark-mode-light-text-on-dark-background-really-better-for-the-eyes . The top two answers there (the second from Alan Kay) are quite compelling about why dark mode (over time) tires out and deforms your eyes’ internal structure.

                            1. 3

                              I never understood the “programmers prefer dark mode” meme. But maybe I’m anomalous in the fact that I banned all past midnight coding in college. :)

                              1. 1

                                Interesting. But I don’t suppose people usually use lobste.rs exclusively for hours like they would use an IDE, for example.

                                That said, if anyone’s willing to implement this, I’m all for it although I don’t particularly like light on dark on web sites these days and my IDEs and text editors are 50:50.

                              2. 2

                                However, it leaves mobile browsers without any options.

                                I’m using Stylus right now with Firefox on Android …

                                1. 2

                                  I would very much appreciate this feature as sometimes I read from low light conditions and having light text on a dark background would be very easy on my eyes.

                                  My wife would probably also appreciate it as I sometimes read sites while in bed and bright screens sometimes disturb her.

                                  1. 1

                                    Please add dark mode.

                                    1. 1

                                      I would definitely use and prefer dark mode.