Skip to content

Instantly share code, notes, and snippets.

View tancnle's full-sized avatar
🌸
Living The Dream ᕙ༼*◕_◕*༽ᕤ

Tan Le tancnle

🌸
Living The Dream ᕙ༼*◕_◕*༽ᕤ
View GitHub Profile
@tancnle
tancnle / countCSSRules.js
Created January 12, 2016 06:34 — forked from psebborn/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {