In order to achieve spriting by compass according to the documentation I wrote this:
// web/sass/icons.scss
@import "../images/icons/*.jpg"; // for any cases also tried .png
@include all-icons-sprites;
and got the error:
error sass/icons.scss (Line 2: File to import not found or unreadable: ../images/icons/*.jpg.
I don’t think the path is wrong because also tried full path.
The structure is like this:
+ web
- sass
+ icons.scss
+ ...
- images
+ icons
- icon1.jpg
- icon2.jpg
- ...
Compass for sprites uses the paths defined in
config.rb.So if you have this structure:
In your
config.rbyou should have something similar to this:Then in your icons.scss you should do this:
Because the import is relative to the
imagesdirectory we defined above.Be sure to understand the configuration file, because it may be tricky http://compass-style.org/help/tutorials/configuration-reference/