Since stylesheets can be added using scripts, and elements and classes can be created using scripts, it can be risky to remove the css and id classes if they are not found in the html of these pages that literally link to those stylesheets.
However, perl is a good tool for any on-site search and replace operation.
source share