css - SASS compass 编译器在多重赋值 @each 循环中窒息

标签 css ruby sass compass-sass precompiler

以下是来自 SASS documentation 的示例:

@each $animal, $color, $cursor in (puma, black, default),
    (sea-slug, blue, pointer),
    (egret, white, move) {
  .#{$animal}-icon {
     background-image: url('/images/#{$animal}.png');
     border: 2px solid $color;
     cursor: $cursor;
   }
}

出于某种原因,它会抛出以下错误:

error sass/screen.scss (Line 8: Invalid CSS after " @each $animal": expected "in", was ", $color, $curs...")

我尝试卸载并重新安装 ruby​​/sass/compass 无济于事。是什么赋予了?以下是我的版本:

  • SASS 3.2.19
  • compass 0.12.5

最佳答案

看起来多重赋值是 SASS 3.3 的特性。也许this会有帮助。

关于css - SASS compass 编译器在多重赋值 @each 循环中窒息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23016269/

相关文章:

javascript - 如何扩展文本区域以填满页面

ruby - 从不同嵌套的哈希中提取特定键

ruby - 将作为键值对的字符串转换为 ruby​​ 中的哈希

html - 如何按时间间隔翻转div

html - li::before 中图像前不需要的空间

ruby-on-rails - 这个 "posts_path"变量在哪里定义的?

ruby - 根本无法让 gulp-ruby-sass 或 gulp-sass 工作

jquery - 添加转换以隐藏/显示列表项

javascript - console.error 错误 : Could not parse CSS stylesheet

css - Twitter Bootstrap 3 导航栏