Question

i need to compress my css as part of my ant build. i noticed that csstidy does this, but it would not be easy to include this in my ant build because i would need to use a different binary on different platforms.

so, is there a java css compressor that people use?

Was it helpful?

Solution

Check out the Yahoo YUI compressor.

It compresses CSS as well as Javascript, and it's written in Java.

Edit: You should be using some sort of HTTP compression as well, like mod_deflate or mod_gzip.

OTHER TIPS

I recently released CSS Compressor. It's a code fork of YUI Compressor, but adds more compression enhancements that make it more similar to csstidy, particularly with regards to grouping selectors that share the same rules. Obviously it's Java, and can be called via the command-line or used as a library within your own Java app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top