Pete Freitag Pete Freitag

How to write Efficient CSS

web

I came across a good article called How to write efficient CSS today. It is a guide that shows several ways you can reduce the size of your CSS files (CSS shortcuts, etc).


Like this? Follow me ↯

How to write Efficient CSS was first published on February 02, 2005.

Comments

Be wary - efficient is not the same as maintainable. Although I use many of these shortcuts, it does obfuscate the code somewhat making maintenance possibly more difficult. Since the CSS file is typically cached after one hit to your site, there are diminishing levels of return for anyone not running monster traffic.
by Brian on 02/02/2005 at 5:41:52 PM UTC
Those are good points Brian. As for the CSS file being cached, this is true - however - the benefit of having a fast loading CSS style sheet, is a faster load for the first impressions. That said it still may be a moot point on a broadband connection a user will not likely notice the difference. If your going to optimize for size your best bet is probably to focus on your HTML header and footer.
by Pete Freitag on 02/03/2005 at 10:42:10 AM UTC