Bounty: Bounty given to whoever share a standalone command-line CSS minifier for Windows (that is, run just like JSMin and CSSTidy, but actually minifies rather than 'prettify' and remove properties
Using Visual Studio 2010 Post-Build Events
, I'm currently working to reduce our CSS/JS framework by merging and minifying the files into .min
for production when building the solution/project.
For the JS I'm using JSmin.exe
while for CSS, CSSTidy.exe
All okay for JSmin, but CSSTidy is removing all IE7 *property
hacks and other properties used by display-table.htc (-dt-display:
). If I use the --preserve_css=true
setting, it keeps the comments (which I don't want) and the *property have the *
stripped out (which I want).
Example:
.row-fluid .span1 {width: 6.382978723%; *width: 6.329787233638298%;}
Becomes (note it added linebreak as well):
.row-fluid .span1 {
width:6.382979%;
width:6.329787%
}
The question made here is what I'm looking for BUT the answer was given for HTML Purifier (which I don't use) instead of a CSSTidy alternative.
So the questions:
- Is it possible to make CSSTidy NOT remove the IE7 hacks nor other invalid properties (which I actually use)?
- Is there any other standalone/command-line CSS compressor (specially one which actually minifies rather than just tidy it)? (bounty for that)
Obs.: The VS solution is TFS shared, can't make all devs install YUI or whatever other framework which isn't standalone, nor other languages frameworks like Ruby/PHP. Currently the jsmin.exe and csstidy.exe were the best since I just added both to the solution and call them on post-events.