Compass and sass: possible to auto-import all partials? [duplicate]

落花浮王杯 提交于 2019-12-05 17:19:54

问题


In a compass/sass setup, ideally I would like to compile every .scss-file into one big style.css. Looking e.g. here, it seems my only option would be to make _partials.scss and @import "these"; from one main file. This seems like double work, since every time I move around a .scss-file e.g. to a sub folder I have to update the referenced import-path.

My question is: is it possible with compass instead to just watch a folder and always compile all partials into one single target output file?


回答1:


Use the Sass Globbing Plugin.

This way you can import an entire folder:

@import "library/partials/*"

The partials will be sorted alphabetically before being imported.



来源:https://stackoverflow.com/questions/13954330/compass-and-sass-possible-to-auto-import-all-partials

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!