I'm curious as to what tools you're using to work with files containing PHP code. I mean that sincerely -- if you've got something you really like, it'd be great to learn something new!
While I don't mind the concept proposed, a few things immediately caught my eye:
1) How often are changes made to these CSS files? It seems to me that caching would be far more crucial than any marginal benefit of this practice. Also, what of allowing multiple CSS files to download in parallel via multiple <link> tags?
[nitpicking from here out]
2) Why does his minify code remove all whitespace and then remove whitespace before '{' and after ':'? They're already gone.
3) Removing all whitespace makes the assumption that no whitespace is necessary. This will completely break, among other things, font-family: "Some Embedded Font";
18 comments
[ 3.6 ms ] story [ 51.6 ms ] threadWhy not do the same thing on deploy?
Get your web server involved and it becomes brainless:
http://www.gethifi.com/blog/Automatic-file-minification-on-n...
Pre-compilation is better and is CDN safe out-of-the-box.
1) How often are changes made to these CSS files? It seems to me that caching would be far more crucial than any marginal benefit of this practice. Also, what of allowing multiple CSS files to download in parallel via multiple <link> tags?
[nitpicking from here out]
2) Why does his minify code remove all whitespace and then remove whitespace before '{' and after ':'? They're already gone.
3) Removing all whitespace makes the assumption that no whitespace is necessary. This will completely break, among other things, font-family: "Some Embedded Font";
2) It does not. The ' ' is actually a double space.
3) Point 2)