Reputation: 5263
I have a Grunt task for compiling scss files using Compass and build fails every other time. When I change a file that uses a Compass mixin, e.g. @import box-sizing(border-box)
, it fails and says that plugin is not included (it actually is included in a file "all.scss" using @import "compass/css3/box-sizing"
, and then it includes other scss files.
Second time (after you see the error) you try to compile it, it works just fine. I guess the reason is that if other files (specifically my "all.scss" file) has not been changed, it skips it during compilation, so include is not found.
Also, if I use require 'box-sizing'
or require "compass/css3/box-sizing"
in config.rb, it also fails saying that it can't find this plugin.
Any idea what's the cause?
Upvotes: 0
Views: 133
Reputation: 23873
box-sizing
is a mixin, so you want to @include
it, not @import
:
@include box-sizing(border-box);
As you were importing it, the compiler treats it as a Compass extension, which is missing in the config.rb
. But it's not an extension in the first place, it's part of Compass in the first place!
So changing @import
to @include
will solve your issue.
See http://sass-lang.com/#mixins for syntax.
Upvotes: 1