Loading global SASS files in multiple Compass projects

天大地大妈咪最大 提交于 2019-12-05 02:52:59

问题


I'd like to create a directory of SASS files that multiple Compass projects will access. This directory would contain a number of SASS files for common elements with similar styles (form elements, clearfixes, resets, etc.) that I'd like to access and use across multiple projects.

How can I include this single global SASS folder in multiple projects?


回答1:


Chris Eppstein, the creator of Compass, has a video describing exactly how to do that here: https://vimeo.com/13804978

Essentially, you'll create a framework in one of your projects, and then build any future other projects (or retroactively add a line to older projects' configurations) to include that framework.




回答2:


Compass exposes this additional property called additional_import_paths, which accepts an Array of Strings that represents paths from where to import Sass files to your project.

I believe this is a way more straight-forward solution; I've just recently implemented on my own projects, and it works as a charm.

Hope this helps.

Here's the link for further reference: http://compass-style.org/help/documentation/configuration-reference/



来源:https://stackoverflow.com/questions/9383716/loading-global-sass-files-in-multiple-compass-projects

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