Switching between dark and light modes

Continuing the discussion from How do i enable dark mode with toggle switch:

Hi,
I followed the steps mentioned above but was partially successful. When I press the toggle button the page does change the color to black but only as far as it is kept pressed, the moment you release it changes back to light mode. What am I doing wrong?

I figured it out, I was using a regular button instead of a toggle switch.

This topic was automatically closed after 70 days. New replies are no longer allowed.