Live data from Hacker News

Please add a "dark" theme for Hacker News

news.ycombinator.com

71–80 of 81 posts

Re: Please add a "dark" theme for Hacker News

#71
post #8

Earlier quoted context omitted.

Or tampermonkey and 2 minutes of writing CSS overrides. What, you people are hackers, aren't you?

So writing CSS overrides for every site I consume sounds healthy and fair to you?

It's easier than you'd think.

In many cases, you can probably get by with your browser's default Reader Mode.

I'll use uBlock Origin's element zapper on a whole heck of a lot of sites, and you can write default rules for common annoyances as well.

If you get fancy, you can write generalised styles which address specific annoyances, and toggle those on or off on specific websites.

Otherwise, I'd found I'd written a thousand or so custom styles over a couple of years at one point. Most were quite elementary (usually font tweaks or removing headers / social link-litter). A few ... somewhat less elementary. Taught myself a lot about CSS in the process.

Re: Please add a "dark" theme for Hacker News

#72
post #28
post #22

What I'd* like to do is let people upload their own CSS and have HN serve it back to them. Then you can make your own darkmode (or anymode), and people can share them so you can reuse someone else's. One question this is contingent on: does there exist a well-defined secure subset of CSS such that we don't have to worry about weird vulnerabilities? * actually I think this was originally kogir's idea

Just let people host their own CSS file, and link it the user's prefs?

Guess not :D

Re: Please add a "dark" theme for Hacker News

#73
post #22

What I'd* like to do is let people upload their own CSS and have HN serve it back to them. Then you can make your own darkmode (or anymode), and people can share them so you can reuse someone else's. One question this is contingent on: does there exist a well-defined secure subset of CSS such that we don't have to worry about weird vulnerabilities? * actually I think this was originally kogir's idea

Custom CSS risks being scope creep, IMO. A dark mode with options of a standard dark and a pure black dark would likely account for 99% of use anyways.

We get a lot of requests for UI modifications beyond dark mode.

Re: Please add a "dark" theme for Hacker News

#74
post #27
post #22

What I'd* like to do is let people upload their own CSS and have HN serve it back to them. Then you can make your own darkmode (or anymode), and people can share them so you can reuse someone else's. One question this is contingent on: does there exist a well-defined secure subset of CSS such that we don't have to worry about weird vulnerabilities? * actually I think this was originally kogir's idea

> does there exist a well-defined secure subset of CSS such that we don't have to worry about weird vulnerabilities? I don’t know the answer, but if it is “no,” would it be feasible to add a few more user settings ala topcolor to achieve a more basic version of this?

The intention is to avoid adding user settings, while still giving people a way to make the UI how they like it.

Re: Please add a "dark" theme for Hacker News

#75
post #22

What I'd* like to do is let people upload their own CSS and have HN serve it back to them. Then you can make your own darkmode (or anymode), and people can share them so you can reuse someone else's. One question this is contingent on: does there exist a well-defined secure subset of CSS such that we don't have to worry about weird vulnerabilities? * actually I think this was originally kogir's idea

HN already lets you edit the top bar color, just repeat that with extra fields for the rest of the layout, and maybe add font size to boot. The UI of the user panel would be slightly more complicated but it would be no less safe than what you already have. And if you want to get fancy, you can use the HTML5 color tag.

edit I see you just answered another similar comment, but I'm still going to obstinately argue for it because it's the simplest and safest solution. There's nothing wrong with adding UI elements when you're adding new functionality. And that extra complexity is still less complex than something more superficially "elegant" like an internal CSS parser.

Re: Please add a "dark" theme for Hacker News

#76

someone posted a ublock origin filter a couple weeks ago... ``` !Hacker News dark theme news.ycombinator.com##body:style(color: #CCCCCC !important; background-color: #1A1A1A !important; ) news.ycombinator.com##table:style(background-color: #2B2B2B !important; ) news.ycombinator.com##input:style(background-color: #DFDFDF !important; ) news.ycombinator.com##table, tr, td, .pagetop, .score:style(color: #CCCCCC !importan…

Man, I always forget that ublock can do that. Here I am with a self-rolled firefox extension to do a dark theme on this site when this probably works even better...

Re: Please add a "dark" theme for Hacker News

#77
post #22

What I'd* like to do is let people upload their own CSS and have HN serve it back to them. Then you can make your own darkmode (or anymode), and people can share them so you can reuse someone else's. One question this is contingent on: does there exist a well-defined secure subset of CSS such that we don't have to worry about weird vulnerabilities? * actually I think this was originally kogir's idea

Make it a github repo anyone can add their username.style.css to, put them to web, and show to each user when they open username's page (maybe with a userscript through githack URLs) After you have a hundred, you can infer the subset that is "generally enough " If the CSS maker userbase is small enough you may just manually check they are fine and pick a small subset to make available for everyone

Re: Please add a "dark" theme for Hacker News

#78
post #73

Earlier quoted context omitted.

Custom CSS risks being scope creep, IMO. A dark mode with options of a standard dark and a pure black dark would likely account for 99% of use anyways.

We get a lot of requests for UI modifications beyond dark mode.

Classifying and prioritising those, and perhaps sharing some of the list, would be a good first approach even if you don't go further.

It'd also be helpful to request rationales for why different modes are requested.

My own major gripes about HN:

- Default font is too small. Screen sizes, resolutions, and dot pitches have evolved dramatically since 2007, in multiple ways. One Size Does Not Fit All. (FIMS -- fixed in my style)

- Default colour scheme is just plain hard to read, all the more so on e-ink (which I use for much of my reading). (FIMS)

- Voting controls are too hard to hit, and easy to confuse. (FIMS)

- For those who want that sort of thing: no dark mode. (Fixed in my other style.)

- Text dialogue too small. (FIMS)

- Various navigation / mode elements hard to distinguish. (FIMS)

- Embuttoning action links ("reply", "more"). (FIMS)

- Providing additional colour context to additional screen elements. (Fixed in my personal style, not on the shared style.)

Going back to the default HN style always feels exceptionally jarring.

Outside CSS tweaks, I'd prefer at least a proper quoting/blockquote style. HN doesn't need to go full Markdown (though That Would Be Nice), but this is one key lacking feature.

Re: Please add a "dark" theme for Hacker News

#79
post #75
post #22

What I'd* like to do is let people upload their own CSS and have HN serve it back to them. Then you can make your own darkmode (or anymode), and people can share them so you can reuse someone else's. One question this is contingent on: does there exist a well-defined secure subset of CSS such that we don't have to worry about weird vulnerabilities? * actually I think this was originally kogir's idea

HN already lets you edit the top bar color, just repeat that with extra fields for the rest of the layout, and maybe add font size to boot. The UI of the user panel would be slightly more complicated but it would be no less safe than what you already have. And if you want to get fancy, you can use the HTML5 color tag. edit I see you just answered another similar comment, but I'm still going to obstinately argue for i…

> extra fields

That leads to settings hell and I don't want that complexity curve.

Re: Please add a "dark" theme for Hacker News

#80
post #79
post #75

Earlier quoted context omitted.

HN already lets you edit the top bar color, just repeat that with extra fields for the rest of the layout, and maybe add font size to boot. The UI of the user panel would be slightly more complicated but it would be no less safe than what you already have. And if you want to get fancy, you can use the HTML5 color tag. edit I see you just answered another similar comment, but I'm still going to obstinately argue for i…

> extra fields That leads to settings hell and I don't want that complexity curve.

If you want people to be able to use custom styles, that's extra complexity regardless. If you let people upload their own stylesheets, you need storage for potentially millions of extra files, validation, size limits, etc. All of the hazards associated with arbitrary file uploads.

Or extra fields. Then all you're dealing with is a few more color values on the backend for a stylesheet that's already being generated by code. It's a lot easier to validate a color (the code for which is already there) than an entire nearly Turing complete language.

You could even split the difference and have themes generated from one or two user supplied colors, instead of fields for each css value.

Post reply on HN