如何在使用Sass的项目中使用罗盘Mixins [英] How to use compass mixins in a project using Sass
问题描述
ColorZilla的渐变编辑器说
ColorZilla's gradient editor says
//需要最新的Compass,将'@import"compass"'添加到您的scss
// needs latest Compass, add '@import "compass"' to your scss
好吧,我发现这并不容易.显然,如果您只抛出@import"compass";在.scss文件的顶部,Sass无法编译,因为找不到_compass.scss.
Well I've found that's not so easy. Obviously if you just throw @import "compass"; at the top of your .scss file, Sass won't compile because _compass.scss can't be found.
- 这是一个使用Sass的asp.net项目.另外,我必须使用sass ruby gem进行编译,而不是罗盘的编译器.
- 我已经安装了指南针宝石.我已按照 http://compass-style.org/install/上的说明进行操作.我已经运行
compass init
,compass create
,compass install
.他们什至没有给我指南针的混响器.
- This is an asp.net project utilizing Sass. In addition, I have to use the sass ruby gem to compile, not compass's compiler.
- I've installed the compass gem. I've followed the instructions on http://compass-style.org/install/. I've run
compass init
,compass create
,compass install
. None of them even give me compass's mixins.
我希望它可以像 bourbon 一样工作,尽管我知道这不是指南针的主要目标.
I expected this to work like bourbon, though I know this isn't compass's primary goal.
我想念什么?
推荐答案
-
安装库
Install the library
bower install compass-sass-mixins
将指南针导入SASS文件
Import the compass into your SASS file
@import "bower_components/compass-sass-mixins/lib/compass"
结帐SASS功能列表:
Checkout SASS function list:
https://github.com/askucher/compass-sass-mixins
这篇关于如何在使用Sass的项目中使用罗盘Mixins的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!