Is There an App That Removes Unused Classes from Frameworks

Is there an App that removes unused classes from frameworks?

There is a Firefox extension called Dust Me Selectors

It extracts all the selectors from all the stylesheets on the page you’re viewing, then analyzes that page to see which of those selectors are not used. The data is then stored in your user preferences, so that as you continue to navigate around a site, selectors will be crossed off the list as they’re encountered.
You’ll end up with a profile of which selectors are not used anywhere on the site.

or give Unused Css a try

http://unused-css.com/


from Unused Css site:

Latish Sehgal has written a windows application to find and remove unused CSS classes. I haven't tested it but from the description, you have to provide the path of your html files and one CSS file. The program will then list the unused CSS selectors. From the screenshot, it looks like there is no way to export this list or download a new clean CSS file. It also looks like the service is limited to one CSS file. If you have multiple files you want to clean, you have to clean them one by one.

Dust-Me Selectors is a Firefox extension (for v1.5 or later) that finds unused CSS selectors. It extracts all the selectors from all the stylesheets on the page you're viewing, then analyzes that page to see which of those selectors are not used. The data is then stored so that when testing subsequent pages, selectors can be crossed off the list as they're encountered. This tool is supposed to be able to spider a whole website but I unfortunately could make it work. Also, I don't believe you can configure and download the CSS file with the styles removed.

Topstyle is a windows application including a bunch of tools to edit CSS. I haven't tested it much but it looks like it has the ability to removed unused CSS selectors. This software costs 80 USD.

Liquidcity CSS cleaner is a php script that uses regular expressions to check the styles of one page. It will tell you the classes that aren't available in the HTML code. I haven't tested this solution.

Deadweight is a CSS coverage tool. Given a set of stylesheets and a set of URLs, it determines which selectors are actually used and lists which can be "safely" deleted. This tool is a ruby module and will only work with rails website. The unused selectors have to be manually removed from the CSS file.

Helium CSS is a javascript tool for discovering unused CSS across many pages on a web site. You first have to install the javascript file to the page you want to test. Then, you have to call a helium function to start the cleaning.

UnusedCSS.com is web application with an easy to use interface. Type the url of a site and you will get a list of CSS selectors. For each selector, a number indicates how many times a selector is used. This service has a few limitations. The @import statement is not supported. You can't configure and download the new clean CSS file.

CSSESS is a bookmarklet that helps you find unused CSS selectors on any site. This tool is pretty easy to use but it won't let you configure and download clean CSS files. It will only list unused CSS files.

Remove unused css classes

Try Firefox extension Dust-Me

OR

you may also try Chrome Developer Tools

This Chrome developer tool has an Audits tab which can shows unused CSS selectors.

Run an audit > under Web Page Performance see Remove unused CSS rules

OR

http://unused-css.com/ tool explores your all pages and removes unused CSS.

Provided an html file and css files, is there any IDE that can find and remove unused css classes?

I have been using this website to check unused css selectors, you can give it a try http://unused-css.com

how to remove unused class in java project?

You can try

Unused Code Detector

An eclipse plugin which might help you. To add to that if the classes are being used via reflection then there will be some problems.

Also read:

The problems found by UCDetector, are only suggestions. Before changing code, you should really know what you are doing! If UCDetector tells you, that there are no references your code still may be used by:

Reflection
Frameworks like Spring, Hibernate or Eclipse which declare dependencies in property files, xml files (extension-points) ...
Third party code, which is using your API
Jars in your workspace
To be continued...

Change visibility may cause problems with inheritance, reflection, instantiation...

It's good idea to do a full text search in workspace for the piece of code, you want to change.

Remove unused CSS classes from frameworks like bootstrap in a react project

As djfdev already wrote purgecss works quite well: purgcss simply searches all JavaScript files for occurrences of the CSS class strings of the used CSS files and removes those which cannot be found.

Finding unused classes in C# app

The quickest way (in Visual Studio) is to right-click the type name and select Find all references from the context menu. This will show you all places where that type is referenced in the current solution.



Related Topics



Leave a reply



Submit