No.js — Dark mode
Implementing ‘dark mode’ with just CSS & HTML.
Dark mode is incredibly vogue. And rightly so — you’re giving your user the ability to change the presentation of your content based on their own preferences and what they find to be easiest on the eyes. With modern CSS super powers, we can actually create a ‘dark theme’ toggle with CSS and HTML alone.
What follows is a barebones example, which I’ll throw some styling on at the end to make it pretty, but my main aim here is to show the…