A while back, I found a very groovy tool that has helped me organize my CSS tremendously by ordering my @Rules, Style Rules, and Properties, standardizing the format and consistencies of line breaks through the document, and compressed my CSS file sizes nearly in half!

So, I wanted to share this with you. The website is http://www.lonniebest.com/FormatCSS/

UPDATE: We now offer a CSS optimizer tool of our own based off of the Open Source CSS Tidy application. Simply click on the tools link at the top of the page and select CSS Tidy.

Things to remember, however:

  • The features change the order of elements and therefore may alter which styles prevail, during style conflict resolution (cascading) they may end up rendering your page differently then you expect.
  • If your CSS isn’t well formed (which I hope it is), you will experience formatting problems and different browsers may interpret your code differently.

If you need to validate your CSS, you can always go to http://jigsaw.w3.org/css-validator/ and use the W3C’s free validator to clean up your code.

Expect a free tool to be posted here in a few days because I’m going to provide a tool that optimizes and cleans your CSS files much more efficiently!

All the best!

Andrew

Article written by Andrew J. McClary, © 2008, All Rights Reserved.

Social Bookmarking:
BlinkList | Blogmarks | del.icio.us | Digg it | FeedMarker | Furl | Linkroll | ma.gnolia | Netscape | Spurl | StumbleUpon | Yahoo MyWeb |

Related Posts

Comments

Leave a Reply