Coding - 碼農筆記

筆記:Foundation編譯錯誤(codekit更新到2.1.4)

 

Codekit更新到2.1.4後,Foundation會出現編譯錯誤……

codekit -version2.1.5
codekit版本升級2.1.5出現編譯錯誤

 

 

 

 

 

 

 

會變成無法將 global.scss  這支scss一起編譯進去

導致整個版面錯誤 🙁

在codekit官網上的Version History有提到這點的解決方式:

Version 2.1.5 (17756)

5 SEPTEMBER 2014

  • Sass updated to 3.4.3 (which was released yesterday, right after the CodeKit update). This resolves several bugs in Sass.
  • WARNING: The current release of Zurb Foundation is broken when compiling with Sass 3.4+. Fortunately, the fix is very easy. See this thread for the one-line change to make.
  • Sass deprecated the old behavior back at the start of 2014 but Zurb still hasn’t updated their code.
  • In related news, I nominate the Zurb Foundation team for the ALS Ice Bucket Challenge.

    code kit版本升級後foundation需修改的檔案
    code kit版本升級後foundation需修改的檔案

 

 

 

 

 

 


 

依上述作法實作筆記如下:

  1. 先找到並開啟_functions.scss   ‘scss/foundation/_functions.scss’
  2. 替換第12行的程式碼,改成如下:
    $modules: () !default;
    @mixin exports($name) {
      @if(not index($modules, $name)) {
        $modules: append($modules, $name) !global;
        @content;
      }
    }
  3. 安裝compass   gem install compass -v 1.0.0 
  4. 完成,版面回復原來樣貌 🙂

 

參考資料來源:

https://github.com/zurb/foundation/issues/5636

compass 安裝 http://compass-style.org/install/

 

進階參考文章:

SCSS 開發原則:禁用 @import ‘compass’;

© 2024 胡同筆記 | WordPress Theme: Cosimo by CrestaProject.