Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate one sprite from many folders using Compass?

I have one folder containing images which also has a subfolder with images. I need to generate just one sprite, not two as happens now, and I also want to control the generated classes depending on the folder/subfolder:

@import "mobile/*.png";
@import "mobile/icons/*.png";

How can I make compass generate just one sprite?

like image 272
IulianP Avatar asked Oct 24 '12 12:10

IulianP


1 Answers

Up to Compass 0.12.1 you can use this:

@import "mobile/**/*.png";

Regression may be appeared with version 0.12.2, preventing this syntax to work. Instead, you can browse a list of directories:

@import "mobile/{,icons}/*.png";

Be sure to start the list with a comma in order to target the current directory mobile.

like image 165
piouPiouM Avatar answered Nov 10 '22 04:11

piouPiouM