67 points · by ingve · 15h ago · 53 comments
If the site doesn't support prefers-color-scheme, then the only way is by using System Settings -> Accessibility -> Invert Colours I think?
It has no force-dark feature like Chrome as far as I can tell
I remember having performance issues with it at some point (maybe on Firefox), but on my current Chromium setup it's fairly nice and disabling any sites that look odd is also easy to do! No issues on HN.
Of course, supporting prefers-color-scheme is a good practice regardless.
Btw it's available on Android too.
1. Increase the font-size 2. Remove the white background for light mode 3. Respect system dark mode and have a nice dark theme
Snippet (hopefully HN renders it ok):
! Hacker News: bigger text + soft light theme + dark theme that follows the system setting
news.ycombinator.com##html:style(zoom: 1.25 !important)
news.ycombinator.com##.comment, .commtext:style(font-size: 10pt !important; line-height: 1.45 !important)
news.ycombinator.com###hnmain:style(max-width: 960px !important)
! Light
news.ycombinator.com##:matches-media((prefers-color-scheme: light)) body, #hnmain, input[readonly]:style(background-color: #f1eee6 !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: light)) .subtext, .comhead, .subtext a:link, .comhead a:link:style(color: #666 !important)
! Dark
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) html:style(color-scheme: dark !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) body:style(background-color: #111 !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) #hnmain, input[readonly]:style(background-color: #1c1c1c !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) td[bgcolor="#ff6600"]:style(background-color: #b34700 !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) .pagetop, .pagetop a:link, .pagetop a:visited:style(color: #111 !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) body, td, .default, .title, .subtext, .comhead, .yclinks:style(color: #8f8f8f)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) a:link, .c00, .c00 a:link, .admin, .admin td:style(color: #dcdcdc !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) a:visited, .subtext a:link, .comhead a:link:style(color: #8f8f8f !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) .c5a, .c5a a:link, .c5a a:visited:style(color: #a8a8a8 !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) .c73, .c73 a:link, .c73 a:visited, .c82, .c82 a:link, .c82 a:visited:style(color: #8a8a8a !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) .c88, .c88 a:link, .c88 a:visited, .c9c, .c9c a:link, .c9c a:visited:style(color: #707070 !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) .cae, .cae a:link, .cae a:visited, .cbe, .cbe a:link, .cbe a:visited:style(color: #575757 !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) .cce, .cce a:link, .cce a:visited, .cdd, .cdd a:link, .cdd a:visited:style(color: #424242 !important)
news.ycombinator.com##:matches-media((prefers-color-scheme: dark)) input, textarea:style(background-color: #262626 !important; color: #dcdcdc !important; border: 1px solid #444 !important)
You can tweak them as you please :)open the menu via the 'uBlock Origin' Button (not Browser extension Settings) ->'Open the dashboard' -> paste plain text block from above -> 'Apply changes'
looking good, thank you!
html:style(filter: invert(90%) hue-rotate(180deg))here are some pictures:
https://gist.github.com/dorianmariecom/3ce3790f4a99e88219e19...
That said, I don't understand the obsession with dark mode. Like, the vast majority of texts I have encountered in my life, books, papers, letters, etc., are black on white. So why dark mode? People tell me it's different on screens because of reasons. I really think it is more of a fad, like, if you wanna be cool, use dark mode. Unfortunately, I will never be cool because of my poor eyes.
I am lucky, however, in the sense that with a "reader view" built into my browser, I can quite easily turn dark-mode websites into something I can actually read. I think it would be fair if that worked the other way around too, for people who prefer dark mode. But wait, I never actually checked, but perhaps you can configure the colors of "reader view"?!
I just can’t distinguish text in dark mode. It’s likely got something to do my eyesight since I’m near sighted.
The other problem I have with dark mode is if you're working with dark windows, then go to open a website, the vast majority of which are light mode, you get blinded.
Dark mode is also very nice for those working in low-light environments, so that your dark vision isn't ruined when you need to get up and attend to other errands. With the rise in Work From Home and flexible schedules, I suspect there's a lot of hackers writing code at 2 AM in very badly lit rooms.
Perhaps, but it doesn't help me - I can only look at a dark mode page for a brief second before I feel my eyes giving up. This might well be because I'm usually coming from a light website, but I don't know how I could make sure that I have a consistently dark UI so such changes never occur.
But again, to me there's no real appeal in dark mode, I like good old black-on-white, and for the rest, there's reader view (on the web, most of the time).
Well then turn on the lights. Take care of your body, if you expect to use it for more than next couple months.
No it wouldn't. Literally no one here has ever asked for HN to become some kind of bloated React mess. The most common complaints people have are simple readability and usability issues, which are reasonable for a text based site with an aging demographic.
The paranoia people have around here that even the smallest change to the layout will lead to "turning into Reddit" or something has always been weird to me. As if you can't have both form and function.
Anyhow, it'd be really easy to add a couple of `<input type="radio">` and make them toggle a css-powered dark mode, but then again I'd change the whole thing to use semantic html instead of `<table>`s, but people here would crucify me for that while saying all websites should be built upon `<table>`s.
Ideally, dark mode would be purely a built-in browser feature instead of a website-specific style set, but here we are.
Personally I like oj-hn.com but I wouldn't be opposed to a built in one.
For people (like me) with bad contrast vision due to mild cataracts - it would be really nice.
javascript:(function(){const id='_dark_mode_bm';const el=document.getElementById(id);if(el){el.remove();}else{const s=document.createElement('style');s.id=id;s.textContent='html{filter:invert(1) hue-rotate(180deg)!important;background:#fff!important;}img,video,canvas,picture,svg{filter:invert(1)%20hue-rotate(180deg)!important;}';document.head.appendChild(s);}})();
It does slow down page rendering on some browsers though