react-hn
react-hn copied to clipboard
Feature/Dark mode
Added dark mode to settings panel #54
- The value is stored both in the state and in local storage for storage and faster rendering.
- I picked the colors from @insin design in the issue
- My initial idea was to toggle a html class and use currentColor css value inheritance. But since that breaks the encapsulation (and it was way harder to use currentColor than I thought) I skipped that. There is a component in https://github.com/insin/react-hn/commit/24771e794f12975b16785f21a5de881d2f6f8287 if anyone is interested.
Thanks for the PR, I like having a single dark mode toggle in place - removes the temptation I was feeling to go all YAGNI while adding a single new theme :+1:
I think some of the highlighting stuff I was playing about with in the example screenshot needed some content changes to support getting the blue highlights in the right place - will check when I'm back at the machine I did that on.
Can we get this merged sooner than later? Literally the only thing keeping me from.using this exclusively.
Friendly ping @insin in case he has a chance to review (it seemed like there were content adjustments necessary for the right highlights) 🐐
Bueller...