tags:

views:

248

answers:

2

I have 3 stylesheets that I have copied and pasted all into 1. As such, there are identical/repeated selectors. Is there an effective tool I can use to remove all repeated selectors if the style properties are identical? Another requirement is if the repeated selector exists once within a group of selectors and once as a standalone selector... the program will remove the selector AND properties of the standalone only (not delete the properties of the selector in a group).

I have no clue if this is possible, but have just spent a few hours looking for one with no avail. Anyone know of anything close? Thanks in advance!

+4  A: 

Dust-Me Selectors(FF Plug-in) will remove any unnecessary or duplicate CSS Selectors.

Jonny Haynes
A: 

http://www.tothepc.com/archives/combine-merge-multiple-css-files/

Edit: 30 April 2010

Today i found this tool it can merge same selectors.

http://tools.pingates.com/css_compress.php

For example:

p { margin: 0 0 1em}

p { background: #ddd}

p { color: #666}

After compresses using this tool it will be converted to

p{margin:0 0 1em;background:#ddd;color:#666}
metal-gear-solid
how will u use this tool, to find duplicates on the same css file?
Livingston Samuel