Light and Dark Scheme for Modern Websites
Published on
Learn how to implement dark and light modes on your website using pure HTML and CSS—no JavaScript required! This guide covers automatic color scheme switching based on the user's system preferences, custom toggles with JavaScript, storing preferences in local storage, and best practices for Astro sites.