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…

Top comments (0)

Advice For Junior Developers

Advice from a career of 15+ years for new and beginner developers just getting started on their journey.