Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp-sass: error parsing interpolated value #64

Open
ronilaukkarinen opened this issue Jun 17, 2015 · 2 comments
Open

Gulp-sass: error parsing interpolated value #64

ronilaukkarinen opened this issue Jun 17, 2015 · 2 comments

Comments

@ronilaukkarinen
Copy link

[21:33:42] gulp-notify: [Error running Gulp] styles failed, check the logs..
[21:33:42] styles error: Error in plugin 'gulp-sass'
Message:
    bower_components/Buttons/scss/types/_longshadow.scss
  21:16  error parsing interpolated value
Details:
    column: 16
    line: 21
    file: /Users/rolle/Projects/dudetest/bower_components/Buttons/scss/types/_longshadow.scss
    status: 1
    messageFormatted: bower_components/Buttons/scss/types/_longshadow.scss
  21:16  error parsing interpolated value

What I'm using:

"bower": "^1.4.1",
"browser-sync": "~2.7.12",
"gulp": "^3.9.0",
"gulp-autoprefixer": "2.3.1",
"gulp-cache": "0.2.10",
"gulp-changed": "^1.2.1",
"gulp-concat": "2.5.2",
"gulp-css-globbing": "^0.1.8",
"gulp-header": "1.2.2",
"gulp-imagemin": "^2.2.1",
"gulp-minify-css": "1.1.6",
"gulp-notify": "^2.2.0",
"gulp-pixrem": "^0.2.3",
"gulp-plumber": "^1.0.1",
"gulp-sass": "^2.0.1",
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "1.2.0",
"gulp-util": "^3.0.5",

It works when if I disable Long Shadow Function all together.

@noderat
Copy link

noderat commented Jun 26, 2015

I can confirm, it seems it's the

      $values: #{$values}, #{$i}px #{$i}px #{$kolor};

causing the issue. This is a libsass bug and can be found on their bugtracker #1277.

It can be fixed by wrapping in parentheses.

@function longshadowFunc($type, $color, $length, $direction: right) {
  $values: 0px 0px $color;

  //LEFT SHADOW
  @if $direction == right {
    @for $i from 1 through $length {
      $kolor: $color;
      $values: (#{$values}), #{$i}px #{$i}px #{$kolor};
    }
  }

  //RIGHT SHADOW
  @if $direction == left {
    @for $i from 1 through $length {
      $kolor: $color;
      $values: #{$values}, unquote($i * -1 + 'px') #{$i}px #{$kolor};
    }
  }

  @return $values;
}

drtz added a commit to drtz/Buttons that referenced this issue Aug 10, 2015
@sunilw
Copy link

sunilw commented Sep 10, 2015

Can confirm both the presence of the bug and the resolution of it using moderat's solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants