Reputation: 2157
how to out put ../images.. for sprite in compass sass?
and does any one know where can i find documents of senieor toturial of compass sass sprite? such as sprite-url function which can not be found in official website.
--css
--sass
--test.scss
--images
--sprite-images
--icons
--a.png
--b.png
.test.scss codes:
-----------------------
$sprite: sprite-map("icons/*.png");
.hello{
background-image : sprite-url($sprite);
}
outputs
------------------------
.hello{
background-image : url('/images/icons-s2c837140f3.png');
}
<!-- but I want to output -->
.hello{
background-image : url('../images/icons-s2c837140f3.png');
}
Upvotes: 3
Views: 2451
Reputation: 13200
Edit: http_path = '../'
may indeed be what you need.
See also generated_images_dir
here: http://compass-style.org/help/documentation/configuration-reference/
If you haven't set a custom project_path or project_dir, you should be able to just set it to ../images
, though you may also need to set relative_assets
to true.
And there isn't much else you need to know about sprite-url and such helpers aside from what you'll find here: http://compass-style.org/reference/compass/helpers/sprites/ or in the issues on GitHub.
Upvotes: 7