Closed marya-ivanovna closed 11 years ago
I'm working with Padrino.
app.rb
c = Compass.configuration c.project_path = root c.images_dir = "assets/images" c.http_images_path = "images" set :sass, Compass.sass_engine_options set :sass, { :load_paths => [ "#{self.root}/assets/stylesheets", "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets", "#{Gem.loaded_specs['bootstrap-sass'].full_gem_path}/vendor/assets/stylesheets" ]} set :scss, sass
footes.css
footer.scss
$icons:sprite-map('icons/*.png', $layout: smart); .get-vk {background:sprite($icons, icon-vk) no-repeat; }
Frontend output: (sprite is invisible, because path is wrong)
#get-footer .container li a.get-vk { background: url("/assets/images/icons-s1683dc2b9a.png") no-repeat scroll 0 0 transparent; }
If I modify by firebug path to "/images/icons-s1683dc2b9a.png" - sprite become visible.
c.http_images_path = "images" needs to replace by http_generated_images_path = "images"
I'm working with Padrino.
app.rb
footes.css
footer.scss
Frontend output: (sprite is invisible, because path is wrong)
If I modify by firebug path to "/images/icons-s1683dc2b9a.png" - sprite become visible.