CodeSleeve / asset-pipeline

This Laravel 4 package provides a very simple and easy to use asset pipeline. It was heavily inspired by the Rails asset pipeline. We make use of the wonderful Assetic package to help with pre-compliation!
http://www.codesleeve.com
MIT License
491 stars 53 forks source link

Minification bug #163

Closed rodrigo-puente closed 2 years ago

rodrigo-puente commented 10 years ago

Hey there.

I have some stylesheets that just dont work if they are minified, my guess is that some file messed up the whole minification. Is there an option to only specify concatenation and leave the file not minified?

evantishuk commented 10 years ago

I had a minification bug that (after much headache) I tracked down to Opera vendor prefixes. They break any rules that follow them in the document. You may want to check your css for the -o- prefix and remove them.

rodrigo-puente commented 10 years ago

Is there any other way rather than tracking that vendor prefix? I've noticed that production environment minifies the file while a local environment doesn't, maybe there's a way to set the same rule to production environment that hasn't been documented?

evantishuk commented 10 years ago

AFAIK, you can force production not to minify in the package's configuration file. That doesn't seem like a great solution though if you can simply patch the CSS.

The Opera problem lies within the minification library itself (https://github.com/nitra/PhpMin). Specifically in this area: https://github.com/nitra/PhpMin/blob/master/CssMin/CssMin.php#L2989. Notice, there are no -o- Opera translations in those arrays? I've posted an issue with the maintainer (https://github.com/nitra/PhpMin/issues/5) and there's already a bug/proposal issue here (#155) to investigate a different minifier.