Sass可以';t编译mixin变量

Sass可以';t编译mixin变量,sass,mixins,Sass,Mixins,我最近从templatemonster.com购买了一个包含SASS源代码的模板。我试图使用SASS--update style.scss编译它,但它停止并输出以下内容: Error: Invalid CSS after "...x: #{$postfix}-": expected expression (e.g. 1px, bold), was ";" on line 7 of custom/mixins/_indent-utilities.scss 有问题的代码是一个混音。据我所知

我最近从templatemonster.com购买了一个包含SASS源代码的模板。
我试图使用
SASS--update style.scss
编译它,但它停止并输出以下内容:

Error: Invalid CSS after "...x: #{$postfix}-": expected expression (e.g. 1px, bold), was ";"
    on line 7 of custom/mixins/_indent-utilities.scss
有问题的代码是一个混音。
据我所知,SASS一直在改变它处理变量的方式。
当前版本3.4.22返回了此错误。
起初,我认为可能有什么东西被弃用了,所以我尝试了一些其他任意版本的SASS,但没有用
不幸的是,模板没有gemfile,所以我不知道它的依赖项是什么

以下是违规代码:

@mixin indent-responsive($prefix, $postfix, $rules, $medias, $offsets) {
  @if ($postfix != '' and $postfix != null) {
    $postfix: #{$postfix}-;
  }

  @if ($prefix != '' and $prefix != null) {
    $prefix: #{$prefix}-;
  }

  @each $resolution, $alias in $medias {
    @if ($resolution == 0) {
      @each $offset in $offsets {
        .#{$prefix}#{$postfix}#{strip-unit($offset)} {
          @each $rule in $rules {
            #{$rule}: $offset;
          }
        }
      }
    } @else {
      @media (min-width: $resolution) {
        @each $offset in $offsets {
          .#{$prefix}#{$alias}-#{$postfix}#{strip-unit($offset)} {
            @each $rule in $rules {
              #{$rule}: $offset;
            }
          }
        }
      }
    }
  }
}
如果有人能提供任何见解,我将不胜感激


谢谢!:)

看起来它没有正确处理字符串/插值。尝试更改此选项:

  @if ($postfix != '' and $postfix != null) {
    $postfix: #{$postfix}-;
  }

  @if ($prefix != '' and $prefix != null) {
    $prefix: #{$prefix}-;
  }
为此:

  @if ($postfix != '' and $postfix != null) {
    $postfix: $postfix + '-';
  }

  @if ($prefix != '' and $prefix != null) {
    $prefix: $prefix + '-';
  }