2012-03-19 64 views
4

我目前使用Mindscape Web Workbench從sass創建css。我正在使用導入所有其他文件的整體site.scss文件。Mindscape Web Workbench Sass unknown mixin

/*** Infrastructure ***************************************/ 
    /**********************************************************/ 
    @import "../../Infrastructure/_Common"; 
    @import "../../Layouts/Layout1/_Layout"; 

    /*** Theming **********************************************/ 
    /**********************************************************/ 
    @import "_Theme"; 

我在_Common中定義的Mixins在_Theme中是未知的。當site.css被編譯時,它一切正常,但Mindscape Web Workbench的intelisense認爲mixins是未定義的。有沒有一種方法讓插件知道這些mixin是被定義的?

回答

2

「@import」的SASS語法與.Net的語法衝突。在.Net中使用SASS時,請使用關鍵字「@ reference」替換「@import」,並註釋掉@reference(s)。有關更多信息,請參閱http://getcassette.net/documentation/AssetReferences

從上面你的代碼將是:

/*** Infrastructure ***************************************/ 
/**********************************************************/ 
/* 
@reference "../../Infrastructure/_Common"; 
@reference "../../Layouts/Layout1/_Layout"; 
*/ 

/*** Theming **********************************************/ 
/**********************************************************/ 
/* 
@reference "_Theme"; 
*/