Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CSS Cleaner or Code Compare

Posted on 2015-02-18
3
Medium Priority
?
197 Views
Last Modified: 2015-02-18
Out of curiosity, is there an online service or download that will compare a website and the CSS file to see if there are entries within the CSS file that are not being used anywhere on a website?

I think I have a bunch of bad/old/unused CSS entries in a certain file.
0
Comment
Question by:rgranlund
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 1000 total points
ID: 40617132
There are several.

The DustMe FireFox extension: https://addons.mozilla.org/en-US/firefox/addon/dust-me-selectors/

A JQuery script: http://joaquinnunez.cl/blog/2009/10/06/jquery-css-cleaner/

The BeeCSS markup generator: http://beecss.theextremewebdesigns.com/

That last one is sort of "detect by proxy."  You paste in your HTML and it returns a blank CSS sheet with the selectors used in the HTML.  Given that, you can figure out what isn't be used from your current stylesheet.
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 40617210
I use the  CSS Usage 0.3.3  Add-on in Firefox.  It will check your CSS and provide a 'cleaned' version if you ask for it.  https://addons.mozilla.org/en-us/firefox/addon/css-usage/
0
 
LVL 7

Author Closing Comment

by:rgranlund
ID: 40617245
Thanks!  I had no idea these were available.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question