【问题标题】:How can I use sass maps with SASS syntax (not SCSS)?如何使用具有 SASS 语法(不是 SCSS)的 sass 映射?
【发布时间】:2017-08-21 09:34:03
【问题描述】:

当我尝试使用此代码时

$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: ( {
   ---------------^

我该如何解决?

【问题讨论】:

标签: sass preprocessor scss-lint


【解决方案1】:

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

目前的解决办法

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

【讨论】:

    猜你喜欢
    • 2019-04-29
    • 1970-01-01
    • 2015-05-05
    • 1970-01-01
    • 2020-06-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多