I've been looking into Compass and the more I look, the more it feels like the way that CSS should be written. As a test case, I'd like to use it in one of my CakePHP projects. Unfortunately, I'm having some trouble with the initial configuration. Specifically, with getting the resources in the right place and referenced properly in the compiled CSS.
I'm creating a :stand_alone
project in my /app
directory. Well, that's what I want to do. Compass doesn't seem to like that. In creating the project, I've told it where to put the css, images and js and those resources do, in fact, make it to the proper directory. Unfortunately, because I'm not creating the directory in the webroot, the resources are being referenced incorrectly when compiled.
I'm creating the Compass project in my CakePHP app/
directory with this command:
$ compass -f blueprint --sass-dir sass --css-dir webroot/css/ --images-dir webroot/img/ --javascripts-dir webroot/js/ --output-style compact .
The compiled CSS, though, wants to reference Blueprint's showgrid.png
image as:
url('/webroot/img/grid.png?1264969358')
I suppose this is a pretty predictable result, but I can't figure out how to get the compiled CSS to reference the correct /img/grid.png?whatever
path. Is that even possible? Am I forced to create my Compass project directly in my webroot?
Thanks.
UPDATE
Content of my config.rb
file:
# Require any additional compass plugins here.
project_type = :stand_alone
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "webroot/css"
sass_dir = "sass"
images_dir = "webroot/img"
http_images_path = "/img"
javascripts_dir = "webroot/js"
output_style = :compact