Late to the party here, but I co-wrote a few thousands words about our experiences removing un-used CSS and taking our Rails app CSS codebase down from over 3000 lines to under 1000 lines.
We did things quite lo-fi, with lowly grep and meticulous workflow that involved comparing development app screens (that were in our rewritten CSS) with production app screens (written in the old CSS) and ensuring everything looked the way we wanted it.
Late to the party here, but I co-wrote a few thousands words about our experiences removing un-used CSS and taking our Rails app CSS codebase down from over 3000 lines to under 1000 lines.
We did things quite lo-fi, with lowly grep and meticulous workflow that involved comparing development app screens (that were in our rewritten CSS) with production app screens (written in the old CSS) and ensuring everything looked the way we wanted it.
https://www.oxbridgenotes.com/articles/css_refactoring_from_append_only_to_modular_css
Create a file deploy.sh containing that command then all you have to do is run ./deploy.sh in future.