Why include a javscript minifier but not css?
blubbll opened this issue · 0 comments
blubbll commented
edit: nvm, didn't think about css being way different to js.
it can't really be minified if you don't change the addressed html classes too.
if anybody still needs some css minifying regex, i built a method based on https://stackoverflow.com/a/4403189:
String.prototype.minify=function(){var e=this;return e=(e=(e=(e=(e=(e=e.replace(//*(?:(?!*/)[\s\S])**/|[\r\n\t]+/g,""))
.replace(/ {2,}/g," ")).replace(/ ([{:}]) /g,"$1")).replace(/([;,]) /g,"$1")).replace(/([{:}]) /g,"$1")).replace(/ !/g,"!")};