@Fahrenhei7

Ошибка со спрайтами compass, как решить?

Здравствуйте! Возникла проблема со спрайтами. Послк включения его в проект появляется в консоли такое сообщение, сами спрайты не работают.
GET file:///images/icons-s5f82c8d186.png net::ERR_FILE_NOT_FOUND


То, что прописано в scss файлах:
Основной файл
// deafult imports
@import "compass/reset";
@import "compass/utilities";
// @import "parts/normalize";
// @import "parts/variables";
// @import "parts/mixins";
@import "../images/icons/*.png";
//sections
@import "parts/header-section";


И часть файла, где спрайт используется:
.left-side-button {
  		background-color: $lsbutton-color;
  		margin-left: 15px;
  		margin-top: 17px;
  		width: 60px;
  		height: 60px;
  		div {
  			@include icons-sprite(lsbutton-bg);
  			width: 30px;
 		 	height: 28px;
  		}

Помогите пожалуйста решить проблему.
Все картинки в папке icons расширения .png

config,rb
require 'compass/import-once/activate'
# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = ""
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"

# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false


# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
  • Вопрос задан
  • 359 просмотров
Пригласить эксперта
Ответы на вопрос 1
langolf
@langolf
Верстак
Скорее всего не видит файл из-за неправильной относительной в ссылке. Попробуйте убрать в ссылке импорта изображений относительность
@import "images/icons/*.png";

Либо
@import "/images/icons/*.png";
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы