Lurker News
Back to discussion

Comment by dang

Earlier replies
dang38 replies#
Ok, you guys, this isn't the first time we've heard this request (https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...). I'm willing to do it (edit: not to change the default! just to add the option). It's just that any CSS issue that goes more than a quarter-inch deep is outside both my expertise and my interest.

We can add CSS to https://news.ycombinator.com/news.css for prefers-color-scheme: dark, but that leaves open the question of specifically what CSS to put in there. Anyone who wants to make a suggestion is welcome to. Post it in this thread so others can comment, or email it to hn@ycombinator.com. I've roped Zain, YC's designer, into helping with this, and we'll come up with something.
p.s. If you're inclined to post "this is 2020, how come HN doesn't $thing", remember our motto: move slowly and preserve things: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que.... When I say slowly I mean slowly. This is also called alligator energy. https://news.ycombinator.com/item?id=16442716

zackkrida3 replies#
I have some styles I use. Screenshots:

https://imgur.com/a/WZAaJST
I don't love when dark modes skew blue, so tried to keep it neutral with blacks and greys
``` @media (prefers-color-scheme:dark) { body { background-color: #2a2b2e; } #hnmain { background-color: rgb(32, 33, 36); }

  a:link, .hnmore a:link, a:visited, td, .c00, .c00 a:link {
    color: #e8eaed;
  }
  .subtext, .comhead a:link, .subtext a:visited, span.subtext a:link, .subtext a:visited {
    color: #9aa0a6;
  }
} ```
deleerium#
The colors here on HN skew warm. Was wondering if anyone felt that way.

I like this scheme quite a bit. The white text on the orange bar is the only part I struggle with.
Why do you prefer neutral schemes?

ship_it#
Looks awesome!
doomjunky1 reply#
Please have a look. I shut my windows and turned off the light for this exercise. Just added a tick more warmth. https://imgur.com/a/t1aQaDv

    #ffffff // info white
    #d9d9d9 // text white
    #282828 // background gray
    #222222 // the other background gray
    #ff6600 // HN orange
(Notice how beautiful regular this hexes are looking.)

Source for a CSS simlpe arrow https://css-tricks.com/snippets/css/css-triangle/

zackkrida#
This is nice!
diebeforei485#
Please make sure the background color is actually black or dark grey, and not some shade of blue.
gardaani3 replies#
Please, don't just force a dark mode to everyone with "prefers-color-scheme: dark".

Some are using OS in light mode, but would still like to use the dark mode. Sometimes, it might be useful to use the light version on dark systems. (e.g. if the dark css is not well made or looks bad on some monitors)
Here's a good thread about it: https://twitter.com/SaraSoueidan/status/1245722023361380354

giancarlostoro1 reply#
I feel like this should be a browser feature: toggle light / darkmode for a given site. Maybe you dont agree with their interpretation of darkmode...
kekub#
I agree. I think the default behaviour is good. prefers-color-scheme: dark should be the default, but be changeable browser wide (not sure if this is already the case) or per domain - just as it works with webcam access (storing the permission to view webcam for a given domain).
deanclatworthy1 reply#
I get it, but at the end of the day it's up to a site owner, surely? Much like we get to choose our site design, we also get to choose whether it's dark or light. It has always been this way.

The CSS property is a good indicator that you prefer a dark color scheme. In my case by turning this on I want an all dark UI on everything I use - all the time. Do we really need to force toggles on every website we build now for a small number of users who want a dark browser UI, but light websites? I'd prefer to go with the assumption that they want the design dark too.

tobyhinloopen#
I agree. Browser-builders should provide a way to configure the wants-dark-mode css query.
tobyhinloopen1 reply#
This should be a browser option, not a website option.

If your browser tells the website you want a dark version, you’re getting a dark version. Seems right, doesn’t it?

Aeolun#
What if I want only HN to be dark? Can I configure it per site yet?

I have no issues with 3 options:
- Use browser
- Light
- Dark
Though. I think it’s too much configuration though.

jhatax#
Firefox for iOS has an “Enable Night Mode” that does a great job with HN in dark mode. Maybe you can start with the Firefox iOS Night Mode CSS and minify from there...
c221 reply#
In our profiles we can already set topcolor, why not just add fields for bgcolor and textcolor too?
DoreenMichele#
If that works, we could also make a list of suggested color combos for people who want an easy solution and don't know much about design and don't want to spend a lot of time futzing with it.

And, I mean, the moderators don't have to make that list. The users could share what color combos work for them.

limograf#
@media (prefers-color-scheme: dark) { { html {filter: invert(1)} }
nl1 reply#
Perhaps make a mobile friendly stylesheet? Please!!!!
chaos_a1 reply#
due to HN's simplicity it's already pretty mobile friendly, they just need to make some of the links bigger.
nl#
Yes exactly!! That would be all it took!
techwolf#
I've been using a "Hacker News Dark" userstyle [1] with Stylus for years, it's only ~30 lines of CSS with a permissive license (CC0). I'd love to see something like it integrated into HN itself.

It'd also be nice to have a way to enable the dark theme without logging in, alongside a persistent setting for logged-in users. A link in the header/footer to set a cookie is probably the simplest way to accomplish that.
[1]: https://userstyles.org/styles/113994/hacker-news-dark

pelmo#
What about just grayscale[1]

[1] https://i.imgur.com/ZfoXaem.png
Parts changed [HTML]:
Parts changed [CSS]: a:link { color:#808080; text-decoration:none; } .subtext { font-family:Verdana, Geneva, sans-serif; font-size: 7pt; color:#606060; } .subtext a:link, .subtext a:visited { color:#606060; }
Header links: #b5b5b5 Header link divider: #666
+darker icons

aloer#
on the topic of css I've been meaning to ask why hn is so big on iPads since ios 13 (https://imgur.com/bcfeEWB)

is that just me? phones work fine, laptops work fine. But iPad pro 12.9" has been like that since the release of 13

Continue this thread — 7 more replies