by TymekDev on 1/11/24, 8:13 PM with 5 comments
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 `:has()`. It is simple, yet supports color scheme preference and updates toggle's label based on active mode.
by DHPersonal on 1/11/24, 8:34 PM
by numtel on 1/11/24, 9:54 PM
by baobaba on 1/11/24, 8:42 PM