A CSS tutorial on adding dark mode to a website that switches automatically based on the user's system preference, using a media query and custom properties for colours.
What you’ll learn
✓Set up colour custom properties for a site's theme
✓Switch colours automatically with a prefers-color-scheme media query