DEV Community

Discussion on: Use CSS to automatically enable dark mode in your web app based on system settings

Collapse
 
mostafakheibary profile image
Mostafa Kheibary

you can just make class and after that with js add some toggle event listener on button
you can make it with css with toggle:checked and after that make the root color changes