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

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的版本不对,3.3之后才支持多字段的map循环。

看Multiple assignment in @each loops这一段!

【热门文章】
【热门文章】