1

The image with sprites appeares in my images folder, but in SASS file I have an error with @import "icons/*.png"; as cannot resolve import to SASS/SCSS file. And in @include all-icons-sprites; there is an error as cannot find mixin "all-icons-sprites"

My folders structure

  • images
    • icons
      • icon_1.png
      • icon_2.png
      • icon_3.png
      • icon_4.png

config.rb

http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"
http_fonts_path = "../fonts"
asset_cache_buster :none
relative_assets = true

SASS file

@import "compass/utilities/sprites";
@import "icons/*.png";
@include all-icons-sprites;

CSS output

.icons-sprite, .icons-icon_1, .icons-icon_2, .icons-icon_3, .icons-icon_4, .icons-icons-sc0b61509a6 {
background-image: url('../images/icons-s705cc83f98.png');
background-repeat: no-repeat;
}

If I change this line in SASS - mistake with import disappears

@import "../images/icons/*.png";

BUT in CSS now I see a wrong path

background-image: url('../images/../images/icons-s3809f1281e.png');

I'm trying to solve this problem for so long. Please, help =/

atanyday
  • 87
  • 1
  • 9

0 Answers0