Hacker News new | ask | show | jobs
by dredmorbius 694 days ago
As others have noted, this is possible on some browsers via extensions. I use Stylus with Firefox and have my own customised HN CSS. Mostly it inverts the main body / border colours, and uses sane font-size specifications, though there are some other tweaks. I've also got a "dark mode" variant. Both are linked from my profile page.

I'd prefer HN adopted my styling, obviously. But a dark-mode toggle would be pretty straightforward.

There are sites which have permitted customising CSS for ages, with Old Reddit being among the m better-known cases. The use-case differs there in that a subreddit's moderator(s) specify the style used by other members, which isn't how you're suggesting HN be modified. People footgunning themselves is lower risk, though it might result in more support.

Another option would be to offer a closed set of vetted styles, or to parameterise some of the CSS values (e.g., font properties, colours, etc.)

There are a few S/E / S/O posts addressing your question, with few deep concerns, though both are 10+ years old.

"security issues with user-supplied CSS?"

<https://stackoverflow.com/questions/23502302/security-issues...>

"How dangerous is it to use CSS styles from an untrusted source?"

<https://security.stackexchange.com/questions/24163/how-dange...>