|
@@ -1,119 +1,136 @@
|
|
|
@import "mixins/mixins";
|
|
|
@import "common/var";
|
|
|
|
|
|
-@include b(tag) {
|
|
|
- background-color: $--tag-fill;
|
|
|
- display: inline-block;
|
|
|
- padding: $--tag-padding;
|
|
|
- height: 32px;
|
|
|
- line-height: 30px;
|
|
|
- font-size: $--tag-font-size;
|
|
|
- color: $--tag-font-color;
|
|
|
- border-radius: $--tag-border-radius;
|
|
|
- box-sizing: border-box;
|
|
|
- border: 1px solid $--tag-border;
|
|
|
- white-space: nowrap;
|
|
|
-
|
|
|
- .el-icon-close {
|
|
|
- border-radius: 50%;
|
|
|
- text-align: center;
|
|
|
- position: relative;
|
|
|
- cursor: pointer;
|
|
|
- font-size: 12px;
|
|
|
- height: 16px;
|
|
|
- width: 16px;
|
|
|
- line-height: 16px;
|
|
|
- vertical-align: middle;
|
|
|
- top: -1px;
|
|
|
- right: -5px;
|
|
|
- color: $--tag-font-color;
|
|
|
+@mixin genTheme($backgroundColorWeight, $borderColorWeight, $fontColorWeight, $hoverColorWeight) {
|
|
|
+ background-color: mix($--tag-primary-color, $--color-white, $backgroundColorWeight);
|
|
|
+ border-color: mix($--tag-primary-color, $--color-white, $borderColorWeight);
|
|
|
+ color: mix($--tag-primary-color, $--color-white, $fontColorWeight);
|
|
|
|
|
|
- &::before {
|
|
|
- display: block;
|
|
|
- }
|
|
|
+ @include when(hit) {
|
|
|
+ border-color: $--tag-primary-color;
|
|
|
+ }
|
|
|
|
|
|
+ .el-tag__close {
|
|
|
+ color: mix($--tag-primary-color, $--color-white, $fontColorWeight);
|
|
|
&:hover {
|
|
|
- background-color: $--tag-default-hover-background-color;
|
|
|
color: $--color-white;
|
|
|
+ background-color: mix($--tag-primary-color, $--color-white, $hoverColorWeight);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @include m(info) {
|
|
|
- background-color: $--tag-info-fill;
|
|
|
- border-color: $--tag-info-border;
|
|
|
- color: $--tag-info-color;
|
|
|
+ &.el-tag--info {
|
|
|
+ background-color: mix($--tag-info-color, $--color-white, $backgroundColorWeight);
|
|
|
+ border-color: mix($--tag-info-color, $--color-white, $borderColorWeight);
|
|
|
+ color: mix($--tag-info-color, $--color-white, $fontColorWeight);
|
|
|
|
|
|
@include when(hit) {
|
|
|
border-color: $--tag-info-color;
|
|
|
}
|
|
|
|
|
|
.el-tag__close {
|
|
|
- color: $--tag-info-color;
|
|
|
- }
|
|
|
-
|
|
|
- .el-tag__close:hover {
|
|
|
- background-color: $--tag-info-color;
|
|
|
- color: $--color-white;
|
|
|
+ color: mix($--tag-info-color, $--color-white, $fontColorWeight);
|
|
|
+ &:hover {
|
|
|
+ color: $--color-white;
|
|
|
+ background-color: mix($--tag-info-color, $--color-white, $hoverColorWeight);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @include m(success) {
|
|
|
- background-color: $--tag-success-fill;
|
|
|
- border-color: $--tag-success-border;
|
|
|
- color: $--tag-success-color;
|
|
|
+ &.el-tag--success {
|
|
|
+ background-color: mix($--tag-success-color, $--color-white, $backgroundColorWeight);
|
|
|
+ border-color: mix($--tag-success-color, $--color-white, $borderColorWeight);
|
|
|
+ color: mix($--tag-success-color, $--color-white, $fontColorWeight);
|
|
|
|
|
|
@include when(hit) {
|
|
|
border-color: $--tag-success-color;
|
|
|
}
|
|
|
|
|
|
.el-tag__close {
|
|
|
- color: $--tag-success-color;
|
|
|
- }
|
|
|
-
|
|
|
- .el-tag__close:hover {
|
|
|
- background-color: $--tag-success-color;
|
|
|
- color: $--color-white;
|
|
|
+ color: mix($--tag-success-color, $--color-white, $fontColorWeight);
|
|
|
+ &:hover {
|
|
|
+ color: $--color-white;
|
|
|
+ background-color: mix($--tag-success-color, $--color-white, $hoverColorWeight);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @include m(warning) {
|
|
|
- background-color: $--tag-warning-fill;
|
|
|
- border-color: $--tag-warning-border;
|
|
|
- color: $--tag-warning-color;
|
|
|
+ &.el-tag--warning {
|
|
|
+ background-color: mix($--tag-warning-color, $--color-white, $backgroundColorWeight);
|
|
|
+ border-color: mix($--tag-warning-color, $--color-white, $borderColorWeight);
|
|
|
+ color: mix($--tag-warning-color, $--color-white, $fontColorWeight);
|
|
|
|
|
|
@include when(hit) {
|
|
|
border-color: $--tag-warning-color;
|
|
|
}
|
|
|
|
|
|
.el-tag__close {
|
|
|
- color: $--tag-warning-color;
|
|
|
- }
|
|
|
-
|
|
|
- .el-tag__close:hover {
|
|
|
- background-color: $--tag-warning-color;
|
|
|
- color: $--color-white;
|
|
|
+ color: mix($--tag-warning-color, $--color-white, $fontColorWeight);
|
|
|
+ &:hover {
|
|
|
+ color: $--color-white;
|
|
|
+ background-color: mix($--tag-warning-color, $--color-white, $hoverColorWeight);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @include m(danger) {
|
|
|
- background-color: $--tag-danger-fill;
|
|
|
- border-color: $--tag-danger-border;
|
|
|
- color: $--tag-danger-color;
|
|
|
+ &.el-tag--danger {
|
|
|
+ background-color: mix($--tag-danger-color, $--color-white, $backgroundColorWeight);
|
|
|
+ border-color: mix($--tag-danger-color, $--color-white, $borderColorWeight);
|
|
|
+ color: mix($--tag-danger-color, $--color-white, $fontColorWeight);
|
|
|
|
|
|
@include when(hit) {
|
|
|
border-color: $--tag-danger-color;
|
|
|
}
|
|
|
|
|
|
.el-tag__close {
|
|
|
- color: $--tag-danger-color;
|
|
|
+ color: mix($--tag-danger-color, $--color-white, $fontColorWeight);
|
|
|
+ &:hover {
|
|
|
+ color: $--color-white;
|
|
|
+ background-color: mix($--tag-danger-color, $--color-white, $hoverColorWeight);
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- .el-tag__close:hover {
|
|
|
- background-color: $--tag-danger-color;
|
|
|
- color: $--color-white;
|
|
|
+@include b(tag) {
|
|
|
+ @include genTheme(10%, 20%, 100%, 100%);
|
|
|
+ display: inline-block;
|
|
|
+ height: 32px;
|
|
|
+ padding: $--tag-padding;
|
|
|
+ line-height: 30px;
|
|
|
+ font-size: $--tag-font-size;
|
|
|
+ color: $--tag-primary-color;
|
|
|
+ border-width: 1px;
|
|
|
+ border-style: solid;
|
|
|
+ border-radius: $--tag-border-radius;
|
|
|
+ box-sizing: border-box;
|
|
|
+ white-space: nowrap;
|
|
|
+
|
|
|
+ .el-icon-close {
|
|
|
+ border-radius: 50%;
|
|
|
+ text-align: center;
|
|
|
+ position: relative;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 12px;
|
|
|
+ height: 16px;
|
|
|
+ width: 16px;
|
|
|
+ line-height: 16px;
|
|
|
+ vertical-align: middle;
|
|
|
+ top: -1px;
|
|
|
+ right: -5px;
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ display: block;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @include m(dark) {
|
|
|
+ @include genTheme(100%, 100%, 0, 80%);
|
|
|
+ }
|
|
|
+
|
|
|
+ @include m(plain) {
|
|
|
+ @include genTheme(0, 40%, 100%, 100%);
|
|
|
+ }
|
|
|
+
|
|
|
@include m(medium) {
|
|
|
height: 28px;
|
|
|
line-height: 26px;
|