0
因此,我剛開始使用Compass Framework,現在希望開始使用其原生的Spriting功能。這樣做,我已經添加了以下到我的SCSS文件的頂部:Compass Sprite返回「文件導入未找到或無法讀取」
@import 'compass/utilities';
@import "*.png";
@include all-img-sprites;
編譯後,我得到以下錯誤:
error path/to/my/project/css/scss/front.scss (Line 4: File to import not found or unreadable: *.png.
Load paths:
Compass::SpriteImporter
path/to/my/project/css/scss
C:/Ruby22/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets)
Compilation failed in 1 files.
[Finished in 1.7s]
我環顧四周,一個解決這個,但令我驚訝的是,即使它有多個線程 - 我似乎無法找到任何相關的東西。
我試着重命名文件夾,認爲「img」文件夾可能是keyworded或某事,但無濟於事。下面你會發現我的config.rb。
# Set this to the root of your project when deployed:
http_path = ""
# Configure sass path
sass_path= "path\\to\\my\\project\\css\\scss"
# Folder locations
sass_dir = "css/scss"
css_dir = "css"
images_dir = "img"
fonts_dir = "fonts"
javascripts_dir = "js"
sprite_load_path = "img"
# Disable debugging comments that display the original location of your selectors
line_comments = false