function(c,r){ // c = css code, r = placeholder for "replace" return c[r='replace'](/((\/\*[^]*?\*\/)|\s)+/g,' ') // replace all comments and spaces, tabs, line breaks with one space [r](/^ | $|[ ;]*([^\w.#) ]) *| (\))/g,'$1$2') // remove spaces around every "safe character": { } ; , : ! + > ~ ( - @, remove semicolon before }, and keep one space between ) and "unsafe characters": a-z A-Z 0-9 # . (for old IE compatibility) [r](/(\D)((0)[a-z%]+|0(\.))/gi,'$1$3$4') // remove leading zero and unit after 0 }