(Call this function with one parameter: a string containing the CSS code)
c.replace(/(\\/\\*[^]*?\\*\\/|\\s)+/g,' ')
.replace(/^ | $|[ ;]*([^\\:\\w.#'\" *-]) *|(:) */g,'$1$2')
Options
-
-
-
-
-
-
By Maxime Euzière for 140byt.es - See Gist - Fork me on Github