Optimize your CSS
Saturday, April 12th, 2008Thought I’d share a useful tool I’ve been using for quite some time now. I find that when working in CSS, I get pretty messy. I indent some of the time, type it in inline, and sometimes I just get too anxious and just type it in anywhere and save. This leaves me with quite a messy looking CSS file. There are several CSS optimizers out there, but I find Clean CSS the best and quickest. Just paste it in and process!
Why Optimize?
Well for two reasons mainly. It helps you get smaller CSS file sizes and better written code. The way the optimizer works actually lets you decide how much compression you want. From super compressed (virtually unreadable and editable by a human being) to visually pleasing. I prefer the standard setting because it gives you a little of both.
Another cool feature is that it helps you with shorthand coding. I am by no means an expert at CSS. I do not have all the shorthand methods memorized (yet!). For those of you using Dreamweaver, like myself, you’ll find that it likes to use longhand code. By this I mean putting each seperate rule on it’s own line. This can get tedious copying and pasting it make a small change. A lot of that stuff can get consolidated into one line, like backgrounds and borders.
So your main reasons for wanting to optimize are to make sure your CSS files are clean. There is a certain art form in clean and concise code. And I’m not even a programmer and I can see that. I’m an artist, so this tool really helps speed things up.