2017-08-21 108 views
0

當我試圖用這個代碼如何使用帶SASS語法(不是SCSS)的sass地圖?

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

我怎樣才能解決呢?

+0

[薩斯映射和縮進語法]的可能的複製(https://stackoverflow.com/questions/23808514/sass-mappings-and-indented-syntax) – blonfu

回答

1

SASS不支持地圖的多行語法。

在當前時刻的溶液

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