0
votes

Year ago I did a Foundation project and all went ok, but I need to do some changes now and now I have issue with compiling scss. Folder struction contains

  • Bower_components/
  • css/
  • images/
  • js/
  • scss/
  • config.rb

Config.rb looks like this

 # Require any additional compass plugins here.
    add_import_path "bower_components/foundation/scss"

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

And I am using Koala for compiling scss file (mobile_CP.scss) that looks like this:

/* 
========== VENDOR
*/
@import "compass/utilities/sprites";
@import "compass/css3/images";
@import "compass/css3/border-radius";
@import "compass/css3/box-shadow"; 

/* 
========== UTILS 
*/
@import "utils/variables.cp.scss";

/* 
========== COMPONENTS 
*/
@import "components/CP/container";

Now I get error where it says:

Error: Undefined mixin 'background-image'.
        on line 165 of D:/TestRepo/mobile.application/trunk/scss/utils/_variables.cp.scss, in `background-image'
        from line 165 of D:/TestRepo/mobile.application/trunk/scss/utils/_variables.cp.scss, in `cpButton-silver'
        from line 246 of D:/TestRepo/mobile.application/trunk/scss/components/CP/_overwrite.scss
        from line 20 of D:\TestRepo\mobile.application\trunk\scss\mobile_CP.scss
  Use --trace for backtrace.

Can't wrap my head around why I get this error now Undefined mixin 'background-image' and before it all worked ok??? Am I overseeing anything?

1
Possible duplicate: stackoverflow.com/questions/17976140/…. The backtrace is pointing to mobile_CP.scss as the culprit, what does that file look like? - cimmanon
I listed the file here, where you have Vendor, UTILS and COMPONENTS comments with @import's. - goran
If you use Compass directly via command line, do you still get this error? - cimmanon
When i use compass from CLI it does nothing at all, which I also find very strange... I go to folder directly, try to watch with compass and compile it in the same folder and it does nothing, it doesn't create new file nor anything. - goran

1 Answers

0
votes

I found the solution for this issue. I was using the new version of compass (1.0.3) and sass (3.4.20), but the thing is i installed foundation project with bower and this didn't work with newer versions so I had to downgrade to compass 0.12.7 and sass 3.2.19. This complied my code with no errors.