Re:Show HN: A Dark Mode Toggle Without JavaScript
by TymekDev on Friday January 12, 2024 @12:39AM
(#38964347)
With JavaScript you could make it a three state toggle: light, dark, and auto. The last one would allow to to back to the default - no preference.
I thought this might use indeterminate checkbox, but that wouldn't be necessary. 'Light', 'dark', and lack of thereof in localStorage already amount to three distinct states.
I thought this might use indeterminate checkbox, but that wouldn't be necessary. 'Light', 'dark', and lack of thereof in localStorage already amount to three distinct states.