导入罗盘精灵图像在一个文件css和@extend它在另一个?

时间:2014-10-25 22:11:26

标签: import sass sprite extend compass

我有一个图标文件夹,我用指南针精灵图像:

@import "compass/utilities/sprites";
@import "icons/*.png";
@include all-icons-sprites(true);

这是在/stylesheets/global/icons.css.scss文件

现在,在/stylesheets/application/index.css.scss文件中我需要使用:

@extend .icons-foo;

我在application / index.css.scss中包含global / folder:

/*
*= require_tree ../global
*= require_tree .
*/

但我有一个错误:

".bar" failed to @extend ".icons-foo". The selector ".icons-foo" was not found.

现在的解决方案是重复我在application / index.css.scss中发布的第一个块。

但如果我把manualy" icon-foo"在DOM元素的类中,类匹配并且有效...

如何不重复相同的指示?如何导入一次精灵并在其他文件中使用它们?

0 个答案:

没有答案