Thus, it is obvious that the options will be used in conjunction with the compass URL Helpers . If you specified imagesDir in Gruntfile.js , you can call the compass images-url() function to create the path to the image folder.
For example, this is how you specify Gruntfile.js :
compass: { build: { options: { cssDir: './source/css/', sassDir: './source/css/', imagesDir: './source/images/', force: true, outputStyle: 'expanded', } } }
And this is how you call the function from your scss file:
background-image: image-url( 'test.png' );
When you run the task, it will be compiled into:
background-image: url('/./source/images/test.png');
The same goes for fontsDir , you just need to call another compass font-url() function. If you want to find more information, go to http://compass-style.org/reference/compass/helpers/urls/
source share