scss在ubuntu编译时报错,win下正常


SCSS代码:


 @each $header, $size in (h1: 2em, h2: 1.5em, h3: 1.2em) {
  #{$header} {
    font-size: $size;
  }
}


 reg@Express:~/workspace$ sass style.scss:style.css
Syntax error: Invalid CSS after "@each $header": expected "in", was ", $size in (h1:..."
        on line 1 of style.scss
  Use --trace for backtrace.
reg@Express:~/workspace$

sass版本是 Sass 3.2.12 (Media Mark) ,ruby版本ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

sass compass css scss

ぞ光D怡戀よ 10 years, 3 months ago

sass的版本不对,3.3之后才支持多字段的map循环。

Multiple assignment in @each loops 这一段!

人畜无害的少年 answered 10 years, 3 months ago

Your Answer