DEV Community

Discussion on: How to create Dark Mode using only CSS

Collapse
 
roblevintennis profile image
Rob Levin

Nice article! I have done partial dark mode switching support a few times and at this point I think the next one will likely support in order:

  1. User settings (assuming something of persistent store)
  2. Automatic (schedule based adjustmed like MacOS supports 3 Prefers system settings
  3. Fallback defaults

Maybe 2 and 3 are one in same. The class on body tag custom properties flip works pretty well otherwise.