maunium / dontasktoask.com

An informational website about why you should ask questions directly instead of asking to ask
https://dontasktoask.com
MIT License
432 stars 97 forks source link

Add automatic dark theme for dark mode users #67

Closed Phundrak closed 3 years ago

Phundrak commented 3 years ago

This PR adds an automatic dark theme for dark mode users through the usage of a media query. It attempts to keep the spirit of the original theme.

It also adds the usage of CSS variables to make the code more maintainable, as well as a file variable for Emacs users so Emacs doesn’t change the indentation that is already used (mine tried to use four spaces by default).

Just in case, I also created a Nord themed version of this fork you can find here, I can create a new PR for it if you want (otherwise I’ll simply use this theme with Stylus).

Phundrak commented 3 years ago

Thanks for the merge!

Probably no need for the Nord theme, except maybe if there's some way to add that as an option without having to use a JavaScript theme switcher (currently the site is nicely plain HTML/CSS) It appears it is possible to implement it in pure HTML/CSS: https://www.sitepoint.com/building-style-switcher-with-pure-css-using-checked/

I’ll try to implement that next week I think, I’ll be pretty busy until then.