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

  1. …in reply to @undefined
    @matthijsewoud My toggle also works when the browser doesn’t understand the media query and (optionally) saves the pref. in localStorage. It assumes the CSS to be organized as outlined: web.dev/prefers-color-scheme/#loading-strategy. Try the demo in different browsers to see it in action: googlechromelabs.github.io/dark-mode-toggle/demo/index.html.