JSFiddle - React, Tailwind, and code Playground

by David Joseph Guzsik

HTML

<link rel="stylesheet" href="http://twitter.github.io/bootstrap/assets/css/bootstrap.css">
<div id="log" />

JavaScript

/* <ignore> */
function $(sel){return document.getElelementById(sel);}
/* </ignore> */

var icons = [];

var sSIndx = (function(){
    var ccsSS = document.styleSheets, styleIndex = -1;
    for (var i=0,l=ccsSS.length; i<l; i++) if (ccsSS[i].href !== null && /bootstrap/g.test(ccsSS[i].href.toString())){ styleIndex = i; break };
    return styleIndex;
})();

if (sSIndx >= 0 && typeof document.styleSheets[sSIndx] === 'object'){
    var cssRules = document.styleSheets[sSIndx].cssRules; // your bootstrap.css
    for (var i=0; i<cssRules.length; i++) {
      var selectorText = cssRules[i].selectorText;
      if (selectorText && selectorText.match(/^\.icon-[a-z_-]+$/)) {
        icons.push(selectorText);
      }
    }
    $('log').text(icons.toString());
}
else $('log').text('document.styleSheets['+sSIndx+'] is not an object or doesn\'t exist.');