Play framework + Greenscript + 'url' CSS rules = wrong path
When using the configuration option greenscript.minimize=true
with Greenscript, all CSS url resources becomes wrong. Fo开发者_C百科r example, with jQuery UI,
.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
will look for images/ui-bg_highlight-soft_100_eeeeee_1x100.png
under the gs
folder, and will not find it, because the resources are under styles/themes/lightness
(for example).
One obvious solution would be to manually replace all relative paths to absolute paths. But is there another (better) solution (not having to modify the original CSS files)?
Yes, this is a problem with current greenscript implementation. The fix should be released in later versions.
For your specific case, say jquery-ui, I recommend you to use CDN delivered css to avoid this issue. E.g. #{greenscript.css 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/smoothness/jquery-ui.css' /}
精彩评论