I have multiple CSS files (the designer made several, bad iterations) that I need to combine to a single file. However, I don’t want to just cat them together. I want to merge the properties for like selectors, ie:
file 1
#mainmenu {width:100%; background:#01568b; text-decoration: none; }
file 2
#mainmenu {width:100%; background:#01568b;}
Where the output would be
#mainmenu {width:100%; background:#01568b; text-decoration: none;}
obviously, this is a simple example, but should explain what I’m looking to do. Are there any tools available, or am I going to have to do this the hard way?
I think you can use the tool CSS Merge for this task.
However you might see some strage stuff going on, due to the importance of styles ect.
Test it in all browsers!
Here is a link
http://www.tothepc.com/archives/combine-merge-multiple-css-files/