Show HN: A Dark Mode Toggle Without JavaScript
https://tymekdev.github.io/no-js-dark-mode-toggle/
Today I scratched my itch of implementing a dark mode toggle without JacaScript. The implementations I saw typically revolved about adding a 'dark' class to body via JS and then controlling it with JS handlers.Thanks to `:has()` selector [0], that passed 90% browser compatibility [1], it is possible to avoid JS.My implementation uses CSS variables combined with a checkbox, `:checked`, and...