如何使用具有 SASS 语法(不是 SCSS)的 sass 映射?
How can I use sass maps with SASS syntax (not SCSS)?
当我尝试使用此代码时
$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 不支持地图的多行语法。
目前的解决方案
$column-width: (first: 210px, second: 200px, third: 100px)
当我尝试使用此代码时
$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 不支持地图的多行语法。
目前的解决方案
$column-width: (first: 210px, second: 200px, third: 100px)