1.scss 封装 color 、background 样式表 目前就写这个一部分,后期会陆续加入其他 封装写法;
(title: '00', color: #000000),
(title: '33', color: #333333),
(title: '66', color: #666666),
(title: '99', color: #999999),
(title: 'aa', color: #aaaaaa),
(title: 'a1', color: #a1a1a1),
(title: 'a2', color: #a2a2a2),
(title: 'a3', color: #a3a3a3),
(title: 'a4', color: #a4a4a4),
(title: 'a5', color: #a5a5a5),
(title: 'a6', color: #a6a6a6),
(title: 'a7', color: #a7a7a7),
(title: 'a8', color: #a8a8a8),
(title: 'a9', color: #a9a9a9),
(title: 'b9', color: #b9b9b9),
(title: 'cc', color: #cccccc),
(title: 'd0', color: #d0d0d0),
(title: 'd7', color: #d7d7d7),
(title: 'e9', color: #e9e9e9),
(title: 'ff', color: #ffffff),
(title: 'f1', color: #f1f1f1),
(title: 'f2', color: #f2f2f2),
(title: 'f3', color: #f3f3f3),
(title: 'f4', color: #f4f4f4),
(title: 'f5', color: #f5f5f5),
(title: 'f6', color: #f6f6f6),
(title: 'f7', color: #f7f7f7),
(title: 'f8', color: #f8f8f8),
(title: 'f9', color: #f9f9f9),
(title: '15ca2b', color: #15ca2b),
(title: '2d3748', color: #2d3748),
(title: '411411', color: #411411),
(title: '969799', color: #969799),
(title: '9c112f', color: #9c112f),
(title: 'b5afaf', color: #b5afaf),
(title: 'c44320', color: #c44320),
(title: 'c8c9cc', color: #c8c9cc),
(title: 'd29d36', color: #d29d36),
(title: 'db1019', color: #db1019),
(title: 'ef3b62', color: #ef3b62),
(title: 'ef807c', color: #ef807c),
(title: 'efbd5c', color: #efbd5c),
(title: 'ffb400', color: #ffb400),
(title: 'ffb80c', color: #ffb80c),
(title: 'ffc527', color: #ffc527),
(title: 'ffd5de', color: #ffd5de),
(title: 'ffd74c', color: #ffd74c),
(title: 'ffeab2', color: #ffeab2),
(title: 'ffefca', color: #ffefca),
(title: 'ffe5eb', color: #ffe5eb),
(title: 'ffeff3', color: #ffeff3),
(title: 'ffe9ee', color: #ffe9ee),
(title: 'fff2f4', color: #fff2f4),
(title: 'fff3c8', color: #fff3c8),
(title: 'ff6678', color: #ff6678),
(title: 'ff6687', color: #ff6687),
(title: 'ff7190', color: #ff7190),
(title: 'f23c63', color: #f23c63),
(title: 'f23c63', color: #f23c63),
(title: 'f23c63', color: #f23c63),
);
/* 字体 颜色 */
@for $i from 1 through length($colorlist) {
$item: nth($colorlist, $i);
$title : map-get($map: $item, $key: title );
$color: map-get($map: $item, $key: color );
.cor-#{$title}{
color: $color;
}
}
/* 背景 单色 颜色 */
@for $i from 1 through length($colorlist) {
$item: nth($colorlist, $i);
$title : map-get($map: $item, $key: title );
$color: map-get($map: $item, $key: color );
.bg-#{$title}{
background: $color;
}
}
网友评论