Back to Browse

Coding a Dark Mode for your Website

14.6K views
Oct 1, 2019
2:53

Dark mode is all the rage, with iOS, macOS, Android and others all shipping a system-wide dark mode for people's devices. By default, your website will not switch with the OS. If you want a site you've built to switch, how do you do that? Deja Hodge will show you the CSS you need to know to implement a dark or light mode in your sites with the `prefers-color-scheme` media query. MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme The CSS specification where this is defined: https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme

Download

1 formats

Video Formats

360pmp47.2 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Coding a Dark Mode for your Website | NatokHD