2014-08-30 61 views
0

編輯: sass 3.4.2發生此問題。使用sass 3.2.13完美地工作。 做了些什麼改變?Zurb Foundation Sass沒有完全編譯

我有一個使用bower install foundation檢出的Zurb基金會的新副本。

當我嘗試使用指南針sass編譯它(sass foundation.scss > foundation.css)時,我得到一個樣式表,它缺少像按鈕這樣的特定組件。採取

> ruby --version 
ruby 1.9.3p545 (2014-02-24) [i386-mingw32] 

> scss --version 
Sass 3.4.2 (Selective Steve) 

確切步驟:

  1. > bower install zurb/bower-foundation

  2. > cd bower_components/foundation/scss

  3. > scss foundation.scss > foundation.css

這裏是輸出:

https://gist.github.com/anonymous/aecbc11a1cefb630a22c

+0

根據文檔,當然你應該使用'bower install zurb/bower-foundation'? – 2014-08-30 09:45:36

+0

'bower install zurb/bower-foundation'同樣的問題 – mushroom 2014-08-30 10:02:48

+0

我不是Bower/Sass用戶,但那些CLI調用看起來不同於發佈的** [here](http://foundation.zurb.com/文檔/ sass.html#CLI)**。 'zurb/bower-foundation'來自他們的GitHub Repo。似乎它們可以互換使用? – 2014-08-30 11:04:53

回答

2

似乎有內基金會較小的錯誤(可能甚至涉及到使用全局變量)。

這些警告/錯誤的指南針和SASS的新版本surpressed(顯示的是從舊版本的薩斯/羅盤輸出的錯誤日誌)

DEPRECATION WARNING on line 270 of /bower_components/foundation/scss/foundation/components/_global.scss: 
Assigning to global variable "$default-float" by default is deprecated. 
In future versions of Sass, this will create a new local variable. 
If you want to assign to the global variable, use "$default-float: left !global" instead. 
Note that this will be incompatible with Sass 3.2. 

DEPRECATION WARNING on line 271 of /bower_components/foundation/scss/foundation/components/_global.scss: 
Assigning to global variable "$opposite-direction" by default is deprecated. 
In future versions of Sass, this will create a new local variable. 
If you want to assign to the global variable, use "$opposite-direction: right !global" instead. 
Note that this will be incompatible with Sass 3.2. 

DEPRECATION WARNING: The return value of index() will change from "false" to 
"null" in future versions of Sass. For compatibility, avoid using "== false" on 
the return value. For example, instead of "@if index(...) == false", just write 
"@if not index(...)". 
     on line of /bower_components/foundation/scss/foundation/_functions.scss, in `exports' 
     from line 336 of /bower_components/foundation/scss/foundation/components/_global.scss 
     from line 5 of /bower_components/foundation/scss/foundation/components/_grid.scss 
     from line 9 of /bower_components/foundation/scss/foundation.scss 
     from line 9 of /resources/sass/screen.scss 
DEPRECATION WARNING on line 13 of /bower_components/foundation/scss/foundation/_functions.scss: 
Assigning to global variable "$modules" by default is deprecated. 
In future versions of Sass, this will create a new local variable. 
If you want to assign to the global variable, use "$modules: append($modules, $name) !global" instead. 
Note that this will be incompatible with Sass 3.2. 

我所做的補救或修復這是做出gemset含基金項目,運行指南針和薩斯的舊版本,以減輕這一問題(這個過程需要RVM)

的Gemfile(可使用bundle init生成)

# A sample Gemfile 
source "https://rubygems.org" 

# gem "rails" 
gem "sass", "3.3.14" 
gem "compass", "1.0.0" 

我希望這可以解決您的問題。

最佳 盧卡斯

0

我們不得不做出一些更改命令來創建一個新的項目和過程/更新爲5.4.5在5.4.4你不會有任何問題。我們添加了一個gemfile來使用Sass 3.3,以便項目編譯併產生一個棄用警告。

此處瞭解詳情: http://foundation.zurb.com/docs/changelog.html

如果您是在薩斯3.4和指南針1新命令。0是: 運行羅盤表前,運行「捆綁」 **只有一次每個項目 然後編譯 - 「捆綁EXEC羅盤表」

這是所以你不要有降級的Sass版本

要知道你有什麼樣的Sass版本 Sass -v compass -v