Switches this whole site, and remembers it on this device
RunningFailed
  • The choices are system (the default, listed first), light and dark. The choice is stored per device and applies as soon as it is picked.
  • System is pure CSS. tokens.css follows prefers-color-scheme with no JavaScript, and changes live when the OS setting changes. data-theme="light" or data-theme="dark" on <html> forces a theme.
  • To avoid a flash of the wrong theme when the user has forced one, add the inline snippet from adapters/theme.js to <head>.
  • Marketing pages are light for everyone. They are designed white edge to edge, so they set data-theme="light" in their own markup.
  • Give every coloured element its dark value at the same time as its light one.
sesan.studio