CSS::Minifier 0 votes

Perl extension for minifying CSS

This module removes unnecessary whitespace from CSS. The primary requirement developing this module is to not break working stylesheets: if working CSS is in input then working CSS is output. The Mac/Internet Explorer comment hack will be minimized but not stripped and so will continue to function.

This module understands space, horizontal tab, new line, carriage return, and form feed characters to be whitespace. Any other characters that may be considered whitespace are not minimized. These other characters include paragraph separator and vertical tab.

For static CSS files, it is recommended that you minify during the build stage of web deployment. If you minify on-the-fly then it might be a good idea to cache the minified file. Minifying static files on-the-fly repeatedly is wasteful.

YUI Compressor 0 votes

YUI Compressor is an open source tool that supports the compression of both JavaScript and CSS files. The JavaScript compression removes comments and white-spaces as well as obfuscates local variables using the smallest possible variable name. CSS compression is done using a regular-expression-based CSS minifier.