如何使用SASS语法(不是SCSS)的sass映射?

时间:2017-08-21 09:34:04

标签: sass preprocessor scss-lint

当我尝试使用此代码时

$column-width: (
    first: 210px
    second: 200px
    third: 100px
    )

@each $column, $width in $column-width
    .col-#{$column}
        width: $width

我收到了错误

Message:
    _sass\grid.sass
Error: unclosed parenthesis
        on line 1 of _sass/grid.sass
>> $column-width: ( {
   ---------------^

我该如何解决?

1 个答案:

答案 0 :(得分:3)

SASS不支持地图的多行语法。

目前的解决方案

[ {
  "level" : "error",
  "schema" : {
    "loadingURI" : "#",
    "pointer" : "/properties/feeder_tx/items"
  },
  "instance" : {
    "pointer" : "/feeder_tx/0"
  },
  "domain" : "validation",
  "keyword" : "additionalProperties",
  "message" : "object instance has properties which are not allowed by the schema: [\"lala\"]",
  "unwanted" : [ "lala" ]
} ]