Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-14-2004, 06:15 AM   PM User | #1
allida77
Regular Coder

 
Join Date: Jun 2002
Location: Cincinnati, OH
Posts: 545
Thanks: 0
Thanked 0 Times in 0 Posts
allida77 is an unknown quantity at this point
CSS software to find unused class/ID selectors

Sometimes I find in my CSS file I have unused selectors in my "core" CSS files. Does anyone know of some software that you can give it a CSS file and then it will search the desired directory for any unused selectors?
allida77 is offline   Reply With Quote
Old 01-26-2009, 06:54 PM   PM User | #2
Loup0999
New to the CF scene

 
Join Date: Jan 2009
Location: Montreal area
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Loup0999 is an unknown quantity at this point
List of freeware from university site

Found this today looking for a was to find redundancies and unused CSS rules in my code. I have adopted a technique they call divide and conquer. Split all my CSS rules up into different categories and separate them from my pages. I use import in the head of my pages.

http://www.d.umn.edu/itss/support/Tr...ign/tools.html

Scroll down a bit to the "Cascading Style Sheet Tools" section and you'll find stuff for validation, cleaning, optimizing, file reduction very handy resources.

You'll have to sort out what is useful and not, also note that some links are dead. :-(

Have fun!
Loup0999 is offline   Reply With Quote
Old 01-26-2009, 07:06 PM   PM User | #3
freedom_razor
Regular Coder

 
Join Date: Dec 2008
Location: Tannhäuser Gate
Posts: 286
Thanks: 7
Thanked 58 Times in 57 Posts
freedom_razor is an unknown quantity at this point
If you have IE with developer toolbar, under View there's an option called CSS Selector Matches. It will show you your style rules and tell you how many elements are matched by each rule.
freedom_razor is offline   Reply With Quote
Old 01-26-2009, 07:08 PM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
I've never found anything that will find them all at once.
I've used DreamWeaver with some success:
  • with all .html pages open
  • click Edit/Find And Replace
  • click the little box at the top that says Find in Open Documents
  • in the Find box type/paste the selector your checking
  • click Find Next

I'm sure you could do the same with NotePad or most any other editor.

I know it's only one selector at a time but it works.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 02-18-2011, 04:27 AM   PM User | #5
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
2 year old thread. I wonder if the FireFox plugin was made back then... I don't know the name of it but there is one. Pretty sure it's an ff plugin.

I had it at one time... Worked well for what you want to do.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 02-18-2011, 09:10 PM   PM User | #6
kansel
Regular Coder

 
Join Date: Jul 2002
Location: Kansas, USA
Posts: 465
Thanks: 0
Thanked 45 Times in 44 Posts
kansel is on a distinguished road
This one? CSS Usage It's still on the Firefox add-ons site but it looks like the developer forgot to renew his domain name as the add-on's homepage has gone missing. This is a Firebug plug-in.
kansel is offline   Reply With Quote
Old 02-18-2011, 10:00 PM   PM User | #7
eberdome
Regular Coder

 
Join Date: Dec 2010
Location: California
Posts: 193
Thanks: 28
Thanked 8 Times in 8 Posts
eberdome is an unknown quantity at this point
BEWARE!! The link that Loup0999 added is ok, but links on that page have malware. Surf at your own risk!!!!!!!
eberdome is offline   Reply With Quote
Old 02-20-2011, 01:53 PM   PM User | #8
mondragon
New to the CF scene

 
Join Date: Feb 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
mondragon is an unknown quantity at this point
I personally use a tool called Unsed-CSS. I find it easier. You don't even have to install an extension and it works on any browser.
mondragon is offline   Reply With Quote
Old 02-20-2011, 02:28 PM   PM User | #9
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,827
Thanks: 9
Thanked 685 Times in 679 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
I use a FF plugin called Dust-Me Selectors which will allow you to run a check for a whole site.

Silly name though...
SB65 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:37 AM.


Advertisement
Log in to turn off these ads.