Compass, adding import path

前端 未结 2 896
深忆病人
深忆病人 2021-01-03 09:22

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.

2条回答
  •  清酒与你
    2021-01-03 09:30

    To compile multiple .scss files you should import the "child" files into the "parent" SASS file using @import "filename";.

    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";
    

    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/

    See this thread.

提交回复
热议问题