2 ms·
This would be pretty trivial in the Chrome Inspector. Try loading your site, opening the inspector console and running this.. document.styleSheets[0].cssRules.
by tln 8y ago
This would be pretty trivial in the Chrome Inspector. Try loading your site, opening the inspector console and running this..
document.styleSheets[0].cssRules.length
..and then work on aggregating all stylesheet rules according to your needs (per stylesheet etc)
Then if you want to automate further, take that code and use puppeteer to run it headless. That'll work with single page apps as well, in a way the OP's tool (nice work btw!) and DomDocument in PHP never will.