Goto Address Mode Opens Links in Emacs
Tuesday, 4 February, 2020
Choosing a static site generator
Friday, 31 January, 2020

Added dark mode for the site

Posted
note #site #css
Got a comment? A question? More of a comment than a question? Talk to me about this page on: mastodon

Got tired of blowing my eyeballs out during evening work.

How? I used prefers-color-scheme. It tries to respect existing light/dark mode settings. Here’s the stylesheet short version.

:root {
  --text-color:                 hsl(0, 0%, 0%);
  --content-background-color:   hsla(0, 0%, 100%, 0.8);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color:               hsl(0, 0%, 100%);
    --content-background-color: hsla(0, 0%, 0%, 0.8);
  }
}

#page-content {
   background-color: var(--content-background-color)
   color:            var(--text-color);
}