JSFiddle - React, Tailwind, and code Playground
CSS
.high {
width:100px;
}
JavaScript
$(document).ready(function () {
classFinder('.high');
});
var classFinder = function (className) {
$.each(document.styleSheets, function (index, cssFile) {
debugger;
if (cssFile.href) var path = cssFile.href.toString();
var classes = cssFile.rules || cssFile.cssRules;
for (var x = 0; x < classes.length; x++) {
if (classes[x].selectorText == className) {
//Find css file name from the file path
alert(path);
}
}
});
}