compass 使用精灵图@include all-icons-sprites()报错?
在执行@import “icons、/*.png”都好好的,并且生成了精灵图。
但是再执行
@include
all-icons-sprites()这一句时就报错了?
/*
NoMethodError: undefined method `parent' for nil:NilClass
Backtrace:
E:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-1.0.3/lib/compass/sass_extensions/functions/sprites.rb:137:in `sprite_does_not_have_parent'
E:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/script/tree/funcall.rb:140:in `_perform'
E:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/script/tree/node.rb:50:in `perform'
E:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:297:in `visit_if'
E:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/base.rb:36:in `visit'
E:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
E:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/stack.rb:79:in `block in with_base'
E:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/stack.rb:115:in `with_frame'
Dēvīl﹖
9 years, 11 months ago