JSFiddle - React, Tailwind, and code Playground

HTML

<p>Some text..</p>
<a>a</a>
<div>div</div>

CSS

p { color:red; font-size:30px; }
a { color:green;}
div {color:inherit;}

JavaScript

$('*').each(function(){
    var c = $(this).css('color');
    
    $(this).attr('style', 'color: '+c+' !important;');       
});

$('p').css('color','orange');//this won't apply as we already set important rule.