在更短的,我可以做這樣的事情變量可以用於Sass文件的導入語句嗎?
@basePath:"../../some_crazy_project_path_to_repeat/less/";
@import "@{basePath}less.less";
所以我試圖做同樣的事情在薩斯
$basePath:"../../some_crazy_project_path_to_repeat/less/";
@import "${basePath}less.scss";
// Syntax error: File to import not found or unreadable: ${basePath}less.scss.
和
@import "#{basePath}less.scss";
// Syntax error: File to import not found or unreadable: #{basePath}less.scss.
有沒有辦法在這樣做薩斯?
[字符串插值](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#interpolation_)使用'#{}' – steveax
@steveax插值是一個非常酷的功能,但我可以'在我的頭上圍繞它如何幫助這種情況? – Shanimal
您是否試過'@import「#{basePath} less.scss」'? –