Ask HN: Dark mode for HN please?
41–50 of 469 posts
Re: Ask HN: Dark mode for HN please?
#42Ok, 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…
Would it be an idea to open a github repo for this and let the community contribute their efforts there?
Re: Ask HN: Dark mode for HN please?
#43Ok, 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…
This commenter linked their own custom stylesheets that they've already been using: https://news.ycombinator.com/item?id=23198500 I haven't inspected their quality or thoroughness myself, but it seemed like a certain amount of that was implied
Re: Ask HN: Dark mode for HN please?
#44Re: Ask HN: Dark mode for HN please?
#45Ok, 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…
Re: Ask HN: Dark mode for HN please?
#46const getAttributes = () => {
let head = document.head || document.getElementsByTagName("head")[0];
return {
head,
};
};const changeStyles = (targetElement) => {
style = document.createElement("style");
// set style.innerHTML to darker colors, append to head
style.type = "text/css";
style.innerHTML = `
body, #hnmain { background: #272822; }
a.storylink, a.morelink, span.commtext { color: #fff; }
a.storylink:visited { color: #444444; }
`;
targetElement.appendChild(style);
};(function main() { const { ...attributes } = getAttributes(); changeStyles(attributes.head); })();
Re: Ask HN: Dark mode for HN please?
#47It'd be fine to offer that as an option, but I'm not really seeing any reason at all why that should be default and I recall a few posts here where quite a few other's expressed they were not fans of dark mode themes.
To be fair, I never browse this or most any other web site on a phone, so, maybe apply that to phones only if that's an option.
Re: Ask HN: Dark mode for HN please?
#48Ok, 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 worry, we'll make sure we don't pull a reddit on you ;)
Re: Ask HN: Dark mode for HN please?
#49Earlier quoted context omitted.
This commenter linked their own custom stylesheets that they've already been using: https://news.ycombinator.com/item?id=23198500 I haven't inspected their quality or thoroughness myself, but it seemed like a certain amount of that was implied
Ah, I'm glad you mentioned that; I took a look at it earlier, but I think what would be most helpful is just the most minimal set of CSS we could put in curly braces after prefers-color-scheme: dark . In other words, a patch to https://news.ycombinator.com/news.css that would strictly only add lines—and preferably the most minimal that would do the trick.
Re: Ask HN: Dark mode for HN please?
#50Here's my own dark theme userstyle for HN, with the colors from Firefox's dev tools. For news.ycombinator.com - https://pastebin.com/K1KS64KR For hn.algolia.com (the search form) - https://pastebin.com/ksH6QcV4
The problem is most browsers don't have an easy way to add custom styles any more. Desktop Safari does, surprisingly, and I use it there. Firefox removed that feature. There are extensions, but browser extensions are a massive security hole so I don't use any that aren't too-big-to-be-corrupted.