Badge add new prop: color

This commit is contained in:
梁灏 2019-09-05 11:45:00 +08:00
parent b321e1abca
commit e3930b7ace
3 changed files with 50 additions and 3 deletions

View file

@ -127,6 +127,18 @@
font-size: @font-size-small;
margin-left: 6px;
}
@colors: pink, magenta, red, volcano, orange, yellow, gold, cyan, lime, green, blue, geekblue, purple;
.make-color-classes(@i: length(@colors)) when (@i > 0) {
.make-color-classes(@i - 1);
@color: extract(@colors, @i);
@darkColor: '@{color}-6';
&-@{color} {
background-color: @@darkColor;
}
}
.make-color-classes();
}
}