• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 627
  • Last Modified:

CSS code clean/tidy/reformatting utility

Does anyone know of a utility that will clean up CSS?

I have a large CSS file that I'd like to reformat to remove all comments,  place all styles on a single line,  etc.   The purpose is to speed up loading of the site - we'll make changes to the 'source' file and ship the output file.

I'd prefer a utility that I could download and run locally.  It could be a DreamWeaver extension.


Cheers,
Glenn
0
GlennGilbert
Asked:
GlennGilbert
1 Solution
 
GlennGilbertAuthor Commented:
Found a couple of on-line code reformat/compression utilities.

One did't work (http://www.cssoptimiser.com/) - this took all the styles and *severely* optimised the code.  I guess it'll work for smaller stylesheets and will result in really compressed files.

The one that worked well was http://flumpcakes.co.uk/css/optimiser/.  Dodgy domain name,  but good utility.  It just about halved the size of the source code (which had lots of comments).


Any other recommendations for the points?


Glenn
0
 
bochgochCommented:
http://csstidy.sourceforge.net/

...has been around for a while, but is perhaps more of an optimiser than tidier...

I've also come across>

http://www.cdburnerxp.se/cssparse/css_optimiser.php

...recently, but not tried it yet...

bg
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now