Skip to content

Instantly share code, notes, and snippets.

@rdillmanCN
Created December 5, 2017 21:54
Show Gist options
  • Save rdillmanCN/95cac070f3c4418018989fcdf2b5eebe to your computer and use it in GitHub Desktop.
Save rdillmanCN/95cac070f3c4418018989fcdf2b5eebe to your computer and use it in GitHub Desktop.
List all style blocks and sheets used within the page, and output to the console.
(function() {
var tab = [].slice.call(document.styleSheets).map(function(e) {
return {
size: e.cssRules.length / 1e3 + " kb",
url: e.href || "Block"
}
});
console.group("CSS Data");
console.table(tab);
console.groupEnd("CSS Data");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment