2011-08-26 33 views
2

當使用配置選項greenscript.minimize=trueGreenscript時,所有CSS url資源都會出錯。例如,使用jQuery UI,播放框架+ Greenscript +'url'CSS規則=錯誤路徑

.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; } 

將尋找images/ui-bg_highlight-soft_100_eeeeee_1x100.pnggs文件夾下,並不會找到它,因爲資源是styles/themes/lightness下(例如)。

一個明顯的解決方案是手動將所有相對路徑替換爲絕對路徑。但有沒有另一種(更好的)解決方案(不必修改原始CSS文件)?

回答

1

是的,這是當前greenscript實現的一個問題。該修補程序應該在更高版本中發佈。

對於你的具體情況,說jquery-ui,我建議你使用CDN交付的CSS來避免這個問題。例如。 #{greenscript.css'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/smoothness/jquery-ui.css'/}

+0

有用的信息! (關於修復) –

+0

在v1.2.6c中修復:https://github.com/greenlaw110/greenscript/issues/18#issuecomment-2035619 –