8 hours ago · Tech · hide

For some incomprehensible reason, the Hacker News admins won't add a dark mode. The usual workaround is to apply custom CSS with tools like Stylus (Chromium, Firefox) or Userscripts (Safari, including iOS). There are also several custom HN web frontends, but they're often slow, and authentication doesn't work. You can use server-side proxying and inject the styles, but that's more involved, and HN can rate-limit or ban server IPs. So, using custom CSS is probably the best option until HN reconsiders. There are plenty of dark HN themes online, but I want to share the simplest one. It works just fine for me: @media (prefers-color-scheme: dark) { html { filter: invert(1) hue-rotate(180deg); background: #fff; } } invert(1) flips every color channel: light becomes dark, dark becomes light, and each color turns into its complement. hue-rotate(180deg) then rotates the hues halfway around the color wheel, approximately restoring the original colors. So light and dark are reversed, but the…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town