JSFiddle - React, Tailwind, and code Playground

by aquadk

HTML

<div id="output">

</div>

CSS

@font-face {
     font-family: "Courier New";
     panose-1: 2 7 3 9 2 2 5 2 4 4;
   }
   
   a:link,
   span.MsoHyperlink {
     mso-style-priority: 99;
     color: blue;
   }

JavaScript

var styleSheets = document.styleSheets;
var styleSheetsLength = styleSheets.length;
for (var i = 0; i < styleSheetsLength; i++) {
  var classes = styleSheets[i].rules || styleSheets[i].cssRules;
  var classesLength = classes.length;
  for (var x = 0; x < classesLength; x++) {
    if (classes[x].cssText) {
      var theDiv = document.getElementById("output");
      theDiv.innerHTML += "#myCustomDiv "+classes[x].cssText + '<br>';
    } else {
      var theDiv = document.getElementById("output");
      theDiv.innerHTML += "#myCustomDiv "+classes[x].style.cssText + '<br>';
    }

  }
}