0

I'm trying to compile my SCSS and I'm having a pretty inexplicable gulp error.

enter image description here

So I checked my code and everything appears fine. Here's the variable in my _colors.scss file.

// dark shades
$gray1:         #3c3c3d !default;
$gray2:         #5a5a5b !default;
$gray3:         #7d7d7e !default;

And here's the line that is triggering the error in _base.scss

body{
  box-sizing: border-box;
  color: $gray1;
  font-family: $base-font;
  font-size: $font-size;
  line-height: $line-height;
  min-height: 100%;
  position: relative;
}

And here's my gulpfile css task that I ran.

gulp.task('css', function() {
    return sass('scss/**/*.scss')
        .pipe(sourcemaps.init())
        .pipe(autoprefixer())
        .pipe(concat('styles.css'))
        .on('error', sass.logError)
        .pipe(sourcemaps.write())
        .pipe(gulp.dest('./css'))
            .pipe(notify({ message: 'Wait for it....wait for it!!!' }));
});

All of my code is also in this repository in case you want to poke around (it's not much yet)

2
  • did you include the _collors.scss before the _base.scss if not it could be that at the time it compiles it, it doesnt know the variable because it gets importet at a later point Commented Aug 17, 2016 at 22:14
  • Ahhhh!!! That's it. Been a while since I used SASS. Add your comment as an answer and I'll mark it correct. Commented Aug 17, 2016 at 22:27

1 Answer 1

2

did you include the _collors.scss before the _base.scss if not it could be that at the time it compiles it, it doesnt know the variable because it gets importet at a later point

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.