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?