4 ms·
Personally I used Chrome dev tools - and it has a feature called 'CSS Selector Profiles' under the 'profile' tab. You can 'record' yourself using a website - a
by laurencei 14y ago
Personally I used Chrome dev tools - and it has a feature called 'CSS Selector Profiles' under the 'profile' tab.
You can 'record' yourself using a website - and Chrome records how many 'hits' each css rule gets.
This is better than Dust-me, and all the other CSS rule detectors - because it allows you to use your site in a 'dynamic' way - and test for all the edge CSS cases (like resizing your browser to small, or enabling an error message etc).
After using my SaaS for an hour - I found hundreds of rules that just never got used.
Also - it tells you how many times a rule got used. So I found a few number of rules that literally only got used once, and I could often re-write them into 1-2 bigger rules - further reducing my CSS overhead.
- GhotiFish 14y agoThat sounded really cool. So I opened up chrome, navigated to YouTube, opened the dev-tools, turned on CSS Selector Profiles, and chrome immediately crashed. :( awwwww.