JSFiddle - React, Tailwind, and code Playground

by neonDog

HTML

<style type="text/css">
</style>
<div class="green">green (my color was specified in the original, and I would not be green if the original was "overwritten")</div>
<div class="red">red (but not really, because another stylesheet with an important rule overriding will be added)</div>

JavaScript

var st=document.getElementsByTagName("style")[0];
st.innerHTML=".green {color: green;}";
//st.innerHTML=".red {color:blue !important; }";
console.log(document.styleSheets);