Reputation: 23563
I'm using SASS sprites: http://compass-style.org/help/tutorials/spriting/
'channel' is the folder name in 'images' that contains my images to be sprited. The following does create an image sprite:
@import "compass/utilities/sprites"; @import "channel/*.png"; @include all-channel-sprites;
However the image path in the CSS is slightly wrong. Its output is this:
background-image: url('/images/channel-s78ec12c377.png')
But I actually need this:
background-image: url('../images/channel-s78ec12c377.png')
I've tried changing my import to this but it throws an error:
@import "../channel/*.png";
Upvotes: 0
Views: 78
Reputation: 23563
Turns out it was to do with the config.rb file. It needed this line:
relative_assets = true
Upvotes: 1