trying to import a folder of sprites… also using Zend Framework so my setup is like the following:
/config.rb
http_path = "public/"
css_dir = "public/css"
sass_dir = "sass"
images_dir = "public/media"
javascripts_dir = "public/javascripts"
/sass/blah.scss
@import "imgim/*.gif";
/public/stylesheets/blah.css
/public/media/imgim/1.gif
2.gif
etc.gif
So I’m calling the import for my list of images but it just doesn’t like it. Tried trawling through the documentation to see where the base import directory is supposed to be looking. Would be nice if it just said somewhere: ‘yep its starting the search relative to your images_dir’ but it can’t be that because it just isn’t working like that. Tried with additional paths like /public/media/ and so on but it just doesn’t like it.
Anyone got any additional information? tried a google and found nothing :/
Cheers, Dom
Don’t worry, most of us ran into that problem. You need to define the
images_dirrelative to your config.rb, you should also try to set thehttp_images_path(this defines what is actually rendered in the css-output)Example (from one of my Symfony projects)
As you can see, setting the correct directory can become pretty mean if the public folder and the sass files are far apart.
Try the command
compass sprite "../please/change/accordingly/public/media/*.gif"(this will generate the sprite css-output) from where your config.rb lies to debug/test the path.Update: If I get your directory structure right your
images_dirshould be “../public/media/” (one dir up, down into public/media).Hope that helps.