Compress CSS code

Monday, January 7th, 2008

When you develop a website you know that you will always have to keep a balance between design and productivity. You need good working pages, easy layout, easy navigation, impressive design etc.

I’m not going to talk about every aspect today but I will share with you some of the tools I like to use when it comes to CSS, bandwith and a faster loading. More exactly, how to compress a CSS code without making the code to look so ugly and unreadable. If your design is based on a lightweight css code than I guess you shouldn’t worry about this but if you like to impress your visitors with visual elements, you can’t get it done without a big css file.

There are many CSS compression tools to find on the Internet at this moment like CSSTidy which takes your input (it must be a valid CSS code otherwise the result might fail to impress) and removes blank lines, comments etc. It has many options to work with.

Ok … so what is the point. The point is one that I’ve experienced a lot lately. I often decided to “parse and optimize” my CSS code using this tools but I changed my mind short after. Why? Because I do like to update my CSS’s, to add things, delete things and so on and, after using a tool like CSSTidy, my code was so hard to follow. I had only 1 line and I couldn’t find anything without using the CTRL + F magic trick. You lose time, development time.

(more…)

Popularity: 17% [?]

About Office-it.orG

This is a site to share my knowledge, discovery and experience related to my hobby and work. Most articles on this site are related to web design, web development, graphic design, short reviews, tips and tricks. I sometimes write some about Microsoft Office Application too.

Want to subscribe?

RSS Subscribe in a reader Or, subscribe via email:
Enter your email address:  
Find entries :