本节要解决的问题
list 和 map 两组数据结构。
核心要点
- 列表用空格或逗号分隔
- map 是键值集合
- map-get 取值
$colors: (primary: #06c, danger: #e00);\n.btn { color: map-get($colors, primary); }把设计 token 放进 map,主题管理会清晰很多。
list 和 map 两组数据结构。
list 和 map 两组数据结构。
$colors: (primary: #06c, danger: #e00);\n.btn { color: map-get($colors, primary); }把设计 token 放进 map,主题管理会清晰很多。