denoland / docland

The documentation generation website for Deno
https://doc.deno.land
MIT License
122 stars 28 forks source link

dark mode toggle #43

Open kitsonk opened 2 years ago

kitsonk commented 2 years ago

Any chance we could get a toggle in a follow up?

Originally posted by @bartlomieju in https://github.com/denoland/docland/pull/41#pullrequestreview-833912224

adiabatic commented 1 year ago

I had a look at https://deno.com/blog/office-hours-update and this section caught my eye:

  • Andy And Tim are excited about our user survey and can't wait to talk about more results soon, but for now we're wondering, does anyone have any magic wishes for Deno's documentation? Folks indicated that it could be improved, but weren't very specific, so we just want to let everyone know hailing frequencies are open!

I'd like to second dark-mode support for the Deno documentation. I'm happy enough with pages that are either light or dark depending on whatever the browser tells the page through prefers-color-scheme, but other people like having manual toggles for this sort of thing, so maybe it might be best to start out with an auto/light/dark three-way toggle.

The only other dark-mode-related feature I'd ask for is to ensure there are no Flashes of Unstyled Content; normally, FOUCs are merely briefly ugly in light mode, but in dark mode, if the FOUC is essentially html { background: white; }, then that's about as pleasant as a surprise flashlight flash.