Hacker News: dark mode
Swaps the bright background for a consistent dark theme that is gentler on the eyes at night.
Code to copy
/* A proper dark theme for the whole site */
html, body {
background: #1a1a1a !important;
color: #c8c8c8 !important;
}
#hnmain {
background: #1f1f1f !important;
}
td, .comment, .commtext, .toptext, .default {
color: #c8c8c8 !important;
}
.title .titleline a:link,
a:link, a:visited {
color: #b9bfc6 !important;
}
.subtext, .comhead, .subtext a, .comhead a,
.rank, td.title {
color: #8a8a8a !important;
}
.commtext a:link, .toptext a:link {
color: #6ea8fe !important;
}
input, textarea {
background: #2a2a2a !important;
color: #e0e0e0 !important;
border: 1px solid #444 !important;
}
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's CSS panel and save — the effect appears instantly.
Rate this example
No ratings yet — be the first.