How to create light and dark color modes with CSS
SMRTR summary
Kelp, a new UI library, implements light and dark modes using CSS variables and classes. The system uses a .kelp-theme-dark class for dark mode, with color variables reassigned in the same cascade layer. A JavaScript snippet detects user preferences and sets the appropriate class, with plans for a manual toggle in the future.
SMRTR provides this summary for quick context. The original article belongs to Go Make Things.
Read the original article