views:

37

answers:

3

I'm looking for a tool that allows you to merge 2 large CSS files. All the ones I've tried so far (like CSSMerge) haven't worked out. Some of them just randomly remove properties. Others choke on the non-standard properties like -webkit and -moz and give me errors. And I also need something that preserves the case of each rule. CSSMerge changed all rules to lower-case.

A: 

The YUI compressor http://developer.yahoo.com/yui/compressor/ can do that.

YUI Compressor is a build-process component written in Java that minifies your JavaScript and CSS.

Ghommey
I don't want to compress my CSS. I just want to merge them into one file to make my life a bit easier later on.
Mal'akh
+2  A: 

Try

CSS Compressor & Minifier

It have lots of options, you can compress and/or minify css.

  • Copy both CSS files into CSS input
  • Turn on Sort selectors and properties
  • Obtain output
  • Manually remove duplicates
  • Re-enter input
  • compress or minify your output
Sandy
Sandy
I'm trying this out right now. Hope it works.
Mal'akh
Thanks a lot! It worked. You just made my day. :)
Mal'akh
glad to hear that :-)
Sandy
A: 

Try SASS, you'll need ruby, but it's awesome for CSS generally. It will merge props though, as well as all it's other awesomeness.

Rich Bradshaw