指南针,添加导入路径 [英] Compass, adding import path
问题描述
要在多个目录中编译.scss文件,我们需要使用add_import_path(http://compass-style.org/help/tutorials/configuration-reference/),但我不知道如何。
To compile .scss files in multiple directories we need to use "add_import_path" (http://compass-style.org/help/tutorials/configuration-reference/), but i dont get how.
我已尝试添加
additional_import_paths
add_import_path "_themes"
add_import_path = "_themes"
additional_import_paths = "_themes"
rb,but no luck,Compass only only from sass_dir =_modules
in my config.rb, but no luck, Compass compiling only from sass_dir = "_modules"
更新:是,此行
add_import_path "_themes"
does not给我们没有找到文件夹的错误,但指南针仍然没有编译.scss在它
doesnt gives us "no folder found" error, but compass still not compiling .scss in it
我做错了?
What am i doing wrong?
推荐答案
要编译多个 .scss
使用 @importfilename;
。
有main.scss,你可能想从一个子样式表中导入更多的CSS,例如child.scss,像这样:
For example if you have main.scss, you might want to import more CSS from a child stylesheet called for example child.scss like this:
@import "_modules/child";
从我的理解,所有 add_import_path
允许您从附加目录导入文件。因此,您也可以从 _themes /
From what I understand, all that add_import_path
does is allow you to import files from an additional directory. So you can also @import
from _themes/
@import
请参见此主题。
这篇关于指南针,添加导入路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!