【发布时间】:2016-11-07 23:32:58
【问题描述】:
我希望能够通过该地图项的索引选择一个 SASS 地图项值。
简化场景:
SCSS
// Colors map (MUST stay this way due to system dependence)
$colors: (
a: red,
b: green,
c: blue
);
@for $i from 1 through 3{
a:nth-child({$i}){ color:[GET COLOR BY $i FROM $COLORS]; }
}
这可能吗?
【问题讨论】:
标签: sass