Blog Entries tagged "css"

Dark Mode and other site updates

Inspired by iOS’s new dark mode (and halloween!), I decided to a dark mode to the website using the new prefers-color-scheme media query. It was surprisingly easy to do. After I’d changed the

This took care of 90% of it:

@media (prefers-color-scheme: dark) {
  html {
    background-color: #19222b;
    color: #eee;
  }

  .page-wrapper__inner {
    background-color: #222f3b;
    color: #eee;
  }
}

Using a straight black-and-white background and foreground combo looks too harsh on the eyes, so you want to find a gray-ish background. Mine is a bluish-grayish...

Read More...