Live data from Hacker News

Ask HN: Dark mode for HN please?

news.ycombinator.com

381–390 of 469 posts

Re: Ask HN: Dark mode for HN please?

#381
post #174

I don't get the appeal of dark mode. Do people really like to pretend that they're on a submarine or something?

Some people use it because they have migraines and bright lights trigger their headaches. Some people use it for "stealth" reasons when they want to be online without giving off a lot of light for some reason. Some people are photophobic -- aka light sensitive -- and just favor darker websites generally. There's myriad reasons to want to use dark mode. It's not any one thing.

Yep, bright screens give me headaches and sometimes migraines, which means I end up needing to lie in a dark room for an hour.

I try to dark mode everything I can as well as have monitors in reader mode and contrast turned down.

Re: Ask HN: Dark mode for HN please?

#382
post #32

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 , bu…

Small request while you're at it: preformatted/code blocks don't display well on smartphones in portrait mode, as there's too much margin at the sides and scrolling becomes awkward. You can test it here:

    text = '"The quick brown fox jumps over the lazy dog" is an English-language pangram—a sentence that contains all of the letters of the alphabet. It is commonly used for touch-typing practice, testing typewriters and computer keyboards, displaying examples of fonts, and other applications involving text where the use of all letters in the alphabet is desired. Owing to its brevity and coherence, it has become widely known.'

    for i,c in enumerate(text):
        print(i, ord(c))
Update: turns out that the margins problem also exists on desktop, but the problem doesn't cause as much problems there.

Re: Ask HN: Dark mode for HN please?

#383
post #32

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 , bu…

Don't over-do it: just start by inverting all the colours ( https://imgur.com/a/uOVCoWz ) and then tweak as necessary for branding.

Re: Ask HN: Dark mode for HN please?

#384
For desktop HN I use DarkReader[0] and for Android HN I use Materialistic[1] — both provide a superb dark-mode experience.

[0] https://darkreader.org/ | https://github.com/darkreader/darkreader

[1] https://play.google.com/store/apps/details?id=io.github.hidr... | https://github.com/hidroh/materialistic

Re: Ask HN: Dark mode for HN please?

#385
post #32

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 , bu…

Screenshot: https://imgur.com/a/mxaNky4 Whipped this up real quick... keeps the spirit of HN I think, and is pretty minimal. Not my best CSS but tables/current CSS make some selectors a little tricky and after all, it's less than 1kb added, no markup or stack changes needed, and this is 'Hacker News' right? :D @media (prefers-color-scheme: dark) { body { background-color: #1F2430; } #hnmain { background-color: #23283…

Lot's of interesting discussion going on. Since I can't update comments here I've made it a gist with warm.css and cool.css.

For those of you asking, feel free to do whatever you want with this CSS ^_^

https://gist.github.com/deleerium/ca6ddeed5dc07a81f764a83ecd...

Re: Ask HN: Dark mode for HN please?

#386
post #284

Whilst touching the CSS. Could it be considered to fix the code overflow on mobile? It is the effect of having a line which is longer than the viewport - so we end up having to scroll that specific line. Some might say it is better not to wrap code but I more often see this as part of a quote. I you really do not like to wrap the lines then I would prefer a scrollbar on the whole section. (I hope this line demos the…

Yes please! The lines don't even need to wrap, but for some reason the
 blocks have `max-width: 200px` on small screens, making them infuriating to read on mobile.

Moving slow is good, but if every comment that uses it has a reply with the same thing that improves the formatting, something needs fixin'.

Re: Ask HN: Dark mode for HN please?

#388
post #32

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 , bu…

My version looks like this: https://imgur.com/a/KCHi5mO CSS: @media (prefers-color-scheme: dark) { body { color:#cccccc; background-color: black } center>table { background-color: #222222;} td { color:#cccccc; } .admin td { color:white; } .subtext td { color:white; } a:link { color:#cccccc; } a:visited { color:#eeeeee; } .default { color:#b2b2b2; } .admin { color:#ffffff; } .title { color:#b2b2b2; } .subtext { color:…

Perhaps it would be an idea if we could add our own CSS in a textarea on our user page.

Re: Ask HN: Dark mode for HN please?

#389

Earlier quoted context omitted.

There's a very solid Stylus theme for HN that I've been using as long as I can remember. Until just now I had honestly forgotten that this wasn't what HN looked like by default. https://userstyles.org/styles/113994/hacker-news-dark

Doesn't work without JS.

hmm. I just tried turning off JS and reloaded Firefox. Everything seems to still work fine on HN with the theme on. I don't know much about web dev so I'm not sure what could be causing it.

Re: Ask HN: Dark mode for HN please?

#390
post #293

Earlier quoted context omitted.

This surprisingly works well. One thing, the background of body is still white for me on desktop this is what I have (combine with someone else who commented about the brightness): @media (prefers-color-scheme: dark) { body { background: #222222; filter:invert(1) hue-rotate(180deg) brightness(0.9) } } Edit, also works on hn.algolia.com

> the background of body is still white for me Had the same problem, changed "body" to "html", added background: #fff, now it works. I turned it into a bookmarklet to make it easy to use on any website: javascript:styles='html {filter: invert(1) hue-rotate(180deg) brightness(.9); background-color: #fff; }'; newSS = document.createElement('style'); newSS.type = 'text/css'; newSS.innerHTML = styles; document.documentEl…

Use stylus to automatically inject it.
Post reply on HN