tomayac’s avatartomayac’s Twitter Archive—№ 12,674

  1. “I considered using prefers-color-scheme […], but decided a toggle would probably be better. Browser support for the color theme preference query isn’t that great yet, plus devs are weird.”—@claviska in quoted tweet. THAT’s why I made <dark-mode-toggle> web.dev/prefers-color-scheme/#dark-mode-but-add-an-opt-out x.com/css/status/1152320795135401987
    1. …in reply to @tomayac
      @css @claviska It initially respects prefers-color-scheme prefs, allows for overriding them (“devs are weird”), and—as a bonus 🎁—handles the case where browsers don’t understand the media query in a future proof way. Demo: googlechromelabs.github.io/dark-mode-toggle/demo/index.html Code: github.com/GoogleChromeLabs/dark-mode-toggle
      1. …in reply to @tomayac
        Also, this is a seriously nice code beautifier: surrealcms.com/beautify/. Great work, @claviska!