-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS minification/aggregation breaks percent measures #140
Comments
A quick look on the source code doesn't reveal problems to me. Maybe this depends on YUI compressor yui/yuicompressor#132 |
Yes, it's probably related to a YUI Compressor bug. |
By setting Anyway, I compiled the plugin after having changed the artifact com.yahoo.platform.yui-yuicompressor to the version 2.4.7 and the output is right. Furthermore, YUI compressor 2.4.7 has always worked well for me, since I've been using https://github.com/davidB/yuicompressor-maven-plugin/ for years, which uses that version (but your plugin gives the flexibility needed for creating css/js groups). So, is it reasonable to go back to 2.4.7? Are there any options available only in 2.4.8 that this plugin uses? |
I've created pull request #141 |
The problem is that I got asked to update to version 1.4.8 to support the latest JavaScript versions which YUI compressor 2.4.7 do not support. |
It looks like the official YUI is no longer mantained by looking at the status of recent open issues (https://github.com/yui/yuicompressor/issues): the last one has been resolved on october 2016. Besides the issues, the last release is from 4 years ago, a lot of time. Would it be viable to enable the closure engine for CSS and disable YUI? This way you could keep YUI 2.4.8 for javascript and the closure engine only for CSS. |
I tried that in the past, but there's a lot of work involved: google/closure-stylesheets#101 |
Sure interested, but I wouldn't be able to give it the adequate time and effort to obtain a robust result. I'm just delaying the use of this plugin for seeing if we find a simple and quick and good solution: if we don't, I will simply use the version I installed locally in which I use YUI 2.4.7. The point is that I really like this plugin and would like that CSS compression gets really resolved somehow. We could wrap the YUI 2.4.7 (or the bleeding edge of YUI or the commit that resolves that issue) in a new CSS compression engine, then use that engine here; we could take another CSS compression engine available on the market, but I struggle a bit to find one (this means that if it exists it's something not that tested/used, so something unreliable). What do you think? |
With version 1.7.6, and the following configuration
{ "bundles": [ { "type": "css", "name": "aaa.css", "files": [ "percent.css" ] } ] }
And the file percent.css being
body { font-family:Arial, Helvetica, sans-serif; font-size:75.0%; color:#000; background:#cdcdcd; }
the resulting file "aaa.css" is
body{font-family:Arial,Helvetica,sans-serif;font-size:75.0;color:#000;background:#cdcdcd}
.The percent sign has been lost in the process.
The text was updated successfully, but these errors were encountered: