Dark mode for docs?

Flipping between community and docs can be jarring when one supports dark mode and the other doesn’t.

1 Like

Dark mode is on our list of things that would be nice to do. :slight_smile:

@media (prefers-color-scheme: dark) {
  html {
     filter: saturate(0.5) grayscale(.8) invert(1);
  }
}
window
  .matchMedia("(prefers-color-scheme: dark)")
  .addEventListener("change", function (mediaList) {
    mediaList.matches ? darkpage() : lightpage();
  });

function darkpage() {
  pageroot().style.filter = "saturate(0.5) grayscale(.8) invert(1)";
}

function lightpage() {
  pageroot().style.filter = "";
}

function pageroot() {
  return document.getElementsByTagName("html")[0];
}

as v1 would be nice (:

1 Like

Might need some more workshopping, but point taken :slight_smile:

2 Likes