2012-08-24 39 views
0

使用通過Themeroller創建的自定義jQuery Mobile主題可以很好地與Rails一起用於本地開發。但是,在運行:Rails 3 + jQuery Mobile Themeroller =無效的CSS

rake assets:precompile

對生產服務器造成此錯誤:

Invalid CSS after "...gradient(linear": expected ")", was ",left top,left ..."

隨着定製theme.min.css存在該行的代碼:

background-image:-webkit-gradient(linear,left top,left bottom,from(#333333),to(#333333));

的定製主題包含在application.css中:

*= require_self 
*= require_tree . 
*= require jquery.mobile.structure-1.1.1.min 
*= require custom-theme.min 
*= require jquery-mobile-fluid960.min 

我相信生成的Themeroller語法是有效的......它是否與css/sass/scss組合有關?

回答

0

原來jQuery Mobile Themeroller可能是一個小buggy。如果沒有設置漸變和邊框(即省略了十六進制顏色代碼),它仍會生成#標籤,但不生成顏色代碼,或將「NaN」附加到漸變顏色的末尾。在Themeroller中設置所有顏色,然後簡單搜索border:1px solid # ;,並在生成的* .min.css文件中進行替換,將其清除。