CSS only dark mode - made simple in 2023
- Publication date:
- last update:
A short guide about building dark/light mode (theme) comprising prefers-color-scheme
property and the ability for the user to manually override. Properly structured HTML, CSS custom properties in respective scope, two radio buttons, SVG icons, and general sibling combinator will do the job! This is CSS-only approach.