Sass 波旁字体面输出src,用引号括起来

Sass 波旁字体面输出src,用引号括起来,sass,font-face,bourbon,Sass,Font Face,Bourbon,因此,我最近刚刚升级到最新的波旁4.0.2和sass 3.4.8。由于这样做,字体面mixin输出被双引号包围的src,这是无效的,并且被字体打断 @包括字体“Avenir”和“../fonts/Avenir/Avenir regular” 预期结果src周围无双引号: @font-face { font-family: "Avenir"; font-weight: normal; font-style: none; src: url('../fonts/avenir/aveni

因此,我最近刚刚升级到最新的波旁4.0.2和sass 3.4.8。由于这样做,字体面mixin输出被双引号包围的src,这是无效的,并且被字体打断

@包括字体“Avenir”和“../fonts/Avenir/Avenir regular”

预期结果src周围无双引号:

@font-face {
  font-family: "Avenir";
  font-weight: normal;
  font-style: none;
  src: url('../fonts/avenir/avenir-regular.eot') format('embedded-opentype');
  src: url('../fonts/avenir/avenir-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/avenir/avenir-regular.woff') format('woff'), url('../fonts/avenir/avenir-regular.ttf') format('ttf'), url('../fonts/avenir/avenir-regular.svg#avenir') format('svg');
}
@font-face {
  font-family: "Avenir";
  font-weight: normal;
  font-style: none;
  src: "url('../fonts/avenir/avenir-regular.eot') format('embedded-opentype')";
  src: "url('../fonts/avenir/avenir-regular.eot?#iefix') format('embedded-opentype')", "url('../fonts/avenir/avenir-regular.woff') format('woff')", "url('../fonts/avenir/avenir-regular.ttf') format('ttf')", "url('../fonts/avenir/avenir-regular.svg#avenir') format('svg')";

}
在src周围输出双引号:

@font-face {
  font-family: "Avenir";
  font-weight: normal;
  font-style: none;
  src: url('../fonts/avenir/avenir-regular.eot') format('embedded-opentype');
  src: url('../fonts/avenir/avenir-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/avenir/avenir-regular.woff') format('woff'), url('../fonts/avenir/avenir-regular.ttf') format('ttf'), url('../fonts/avenir/avenir-regular.svg#avenir') format('svg');
}
@font-face {
  font-family: "Avenir";
  font-weight: normal;
  font-style: none;
  src: "url('../fonts/avenir/avenir-regular.eot') format('embedded-opentype')";
  src: "url('../fonts/avenir/avenir-regular.eot?#iefix') format('embedded-opentype')", "url('../fonts/avenir/avenir-regular.woff') format('woff')", "url('../fonts/avenir/avenir-regular.ttf') format('ttf')", "url('../fonts/avenir/avenir-regular.svg#avenir') format('svg')";

}
字体混合如下所示,请参见注释行:

@mixin font-face(
  $font-family,
  $file-path,
  $weight: normal,
  $style: normal,
  $asset-pipeline: $asset-pipeline,
  $file-formats: eot woff ttf svg) {

  $font-url-prefix: font-url-prefixer($asset-pipeline);

  @font-face {
    font-family: $font-family;
    font-weight: $weight;
    font-style: $style;

    @if contains($file-formats, eot) {
      // THIS IS THE TROUBLE LINE
      src: "#{$font-url-prefix}('#{$file-path}.eot') format('embedded-opentype')";
    }

    src: font-source-declaration(
      $font-family,
      $file-path,
      $asset-pipeline,
      $file-formats,
      $font-url-prefix
    );
  }
}
还有其他人能复制这个吗


任何想法都非常感谢

我试着把你的代码放在sassmeister里,它能用。好的,那么听起来这可能是sass版本的问题?是的,Sassmeister使用sass 3.4.7,也许这就是问题所在。好的,我看了3.4.8版本,里面没有任何东西会导致这个问题。。。