That would have the advantage of supporting complex webapps written in any language/environment.
That would have the advantage of supporting complex webapps written in any language/environment.
As important as what classes were used is what classes were in the HTML, but didn't exist.
Instead of manually clicking around a webapp, you could do a test suite. This gives another way to measure test coverage.
I assume we have to wait for a browser vendor to do this? I haven't seen any plugin/extension feature that reaches this stuff.
Then again, we have good open source browsers...
Or styles for a CMS module that is currently not in use (e.g. for open positions in a company).
I wonder what the least used, yet still used CSS is I ever wrote (relative to project traffic). Maybe some feature a Client requested, I knew he would never really use, but he insisted on (deep linking to some modal for a facbeook post or something).
Every visitor had a small probabillity it would run the code, and after a couple of million visitors, they had a pretty good idea of what styles were unused.
A large user base would give you decent coverage.
It is, though, limited to the context of a single page. You can't browse several pages and then see what the net unused css is.
I believe, though, extensions can talk to dev tools, so there's some plausible way to extend it.