Tag : #darkmode

Rethinking the handling of dark mode

22 Mar 2020   siteupdate   0

Those familiar with this site and myself know of my obsession with dark mode: I have a dark background on my terminal, I install dark usercss for sites I frequent, I make dark-mode-first PDFs, and I configured by PDF viewer to recolor documents to be dark by default. For 2019 to be the year of dark mode, I felt like I was truly blessed by whatever omnipotent deity there is.

With 2019 now in the past, I figured it’s probably a good time to revisit how I’ve did my color scheme swapping. I recognize that it wasn’t a good idea to load all of my styles in one file, have two completely separate files with a lot of similarities, and swap the two “big” files while changing themes. There were two reasons why I employed that decision;

  • CSS variables was not widely used at the time; and
  • CSS preprocessors do not work very well with CSS variables.
READ MORE >>