I have a html code with inline css and also with css media queries While running the inline css is not being replaced by media queries. I need to find a way to add those !important in every style inside the media query dynamically (may be with js). Is there a way to do this other than traversing through to html content as string and finding the styles and adding it. I have added a sample code for reference
body {
background-color: yellow;
}
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
<body style="background-color:red;">
</body>