0

I have a icons folder, I use compass to sprites images:

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

This is in /stylesheets/global/icons.css.scss file

Now, in /stylesheets/application/index.css.scss file I need to use:

@extend .icons-foo;

I include global/ folder before application/ in application/index.css.scss :

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

But I have an error :

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

The solution for now it's to repeat the first block I put in this post in application/index.css.scss.

But if I put manualy "icons-foo" in class of DOM element, the class is match and works...

How not repeat same instruction? how can I import one time sprite and used them in other file?

Matrix
  • 3,458
  • 6
  • 40
  • 76
  • possibly related: http://stackoverflow.com/questions/17976140/false-positive-undefined-variable-error-when-compiling-scss – cimmanon Oct 25 '14 at 23:22
  • It's not realy helpful :s – Matrix Oct 29 '14 at 14:25
  • resolve by correct organisation of sass project: http://stackoverflow.com/questions/26974765/rails-4-and-compass-how-import-only-one-time-my-sass-files – Matrix Nov 18 '14 at 18:03

0 Answers0