:::: MENU ::::

Thursday, November 27, 2008

Packer for .NET has been updated to include a CSS Minify mode which does the same for CSS that JSMin does for JavaScript. Thanks for this addition goes to Chris Lienert who updated the open source project with work done by Daniel Crenna and Michael Ash to port YUI Compressor.

Why Minify CSS?

CSS can be very complex and it helps to place inline comments in your stylesheets to assist with maintenance. These comments can explain workarounds which are used to support cross-browser layouts. We all have workarounds or even hacks to support legacy browsers like IE6. Often these techniques do not make much sense when they are viewed months later without any context. Normally comments are left out of CSS files because they increase the size of the documents and reveal internal details to any curious developer digging through your code. Now you can minify your CSS during your deployment process with Packer for .NET to strip your comments and unnecessary whitespace. The minification process also uses other techniques to further reduce the size of the output document.

More information:

Update: Version 4.0.2 is out which includes updates to includes wildcard expansion for the command-line utility. There was also a bug where the output file could not match the input file which has been fixed.