You must log in or # to comment.
This should help you
https://css-tricks.com/a-complete-guide-to-dark-mode-on-the-web/
If you’re not wanting to use JS then you’re reliant on the users browser supporting
prefers-color-scheme
(caniuse) or forcing them to reload the page.<a href=“dark-page.html”>Dark Mode</a>
Use CSS
You can style both dark mode and light mode with CSS but the question is how will you toggle between them? A button? Then you need JavaScript
The user can toggle their operating system’s setting. During development, the developer can do it in their browser’s dev tools.
Locking as this post violates rule 5.
Just use JavaScript.