You must log in or register to comment.
Locking as this post violates rule 5.
Just use JavaScript.
This should help you
https://css-tricks.com/a-complete-guide-to-dark-mode-on-the-web/
<a href=“dark-page.html”>Dark Mode</a>
Use CSS
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.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.