以下是来自 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/