DEV Community

Soumya Roy
Soumya Roy

Posted on

How to change CSS media query styles dynamically using JavaScript?

I am trying to implement a dark mode for only screens that are less than 700px. I have body background set globally for all screens, then there is JS set interval function that will change the body background color to white after sometime. @media only screen and (max-width: 700px) has…

Latest comments (0)