@import './themeVariable.scss'; //导入颜色列表

//取出主题色
@mixin themify($themes) {
    // @each 来遍历一个map 每次循环第一个取出的为键 每次第二个取出的为值
    @each $theme-name,
    $map in $themes {
        $myMap: $map !global; //全局变量供函数调用
        //新定义一个类,#{} 用来插值参数，可以用来动态修改名称
        .u-theme-#{$theme-name} {
            @content;//插入位置
        }
    }
}

//从主题色map中取出对应颜色
@function themed($key) {
    @return map-get($myMap, $key)

}