-
Notifications
You must be signed in to change notification settings - Fork 138
/
index.less
148 lines (122 loc) Β· 3.63 KB
/
index.less
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
@import '../../style/variable/index.less';
@import '../../style/mixins/reset.less';
@tag-line-height: calc(var(--ix-font-size-sm) + var(--ix-line-height-gutter) - var(--ix-tag-border-width) * 2);
.@{tag-prefix} {
.reset-component-new();
.reset-font-size(var(--ix-font-size-sm));
display: inline-flex;
align-items: center;
color: var(--ix-tag-color, var(--ix-color-text-info));
background-color: var(--ix-tag-background-color, var(--ix-color-emphasized-container-bg));
padding: 0 calc(var(--ix-margin-size-sm) - var(--ix-tag-border-width));
line-height: @tag-line-height;
border: var(--ix-tag-border-width) solid transparent;
border-radius: var(--ix-tag-border-radius);
& + &,
& + .@{tag-prefix}-group,
.@{tag-prefix}-group + &,
.@{tag-prefix}-group + .@{tag-prefix}-group {
margin-left: var(--ix-margin-size-sm);
}
> .@{icon-prefix} {
margin-left: calc(var(--ix-margin-size-xs) * -1);
font-size: var(--ix-font-size-icon);
}
.@{icon-prefix} + &-content {
padding-left: var(--ix-margin-size-xs);
}
&-content {
flex: auto;
text-align: center;
}
&-bordered {
border-color: var(--ix-tag-border-color, var(--ix-color-border));
}
&-round {
border-radius: @tag-line-height;
min-width: var(--ix-tag-min-width-round);
}
&-rect {
border-radius: 0;
min-width: var(--ix-tag-min-width-rect);
}
&-close-icon {
margin-left: var(--ix-margin-size-xs);
font-size: var(--ix-font-size-icon);
cursor: pointer;
}
.tag-status-color(success);
.tag-status-color(info);
.tag-status-color(warning);
.tag-status-color(risk);
.tag-status-color(error);
.tag-status-color(fatal);
&-filled {
--ix-tag-color: var(--ix-color-text-inverse);
--ix-tag-background-color: var(--ix-tag-bg-color-filled);
}
}
.@{tag-prefix}-numeric {
@tag-prefix-size: calc(@tag-line-height + var(--ix-margin-size-xs));
position: relative;
padding-left: calc(@tag-prefix-size + var(--ix-tag-border-width));
min-width: var(--ix-tag-min-width-numeric);
border-radius: @tag-line-height;
&-prefix {
position: absolute;
left: -2px;
top: -2px;
display: flex;
align-items: center;
justify-content: center;
height: @tag-prefix-size;
width: @tag-prefix-size;
background-color: inherit;
border: var(--ix-tag-border-width) solid var(--ix-color-container-bg);
border-radius: @tag-prefix-size;
}
}
.@{tag-group-prefix} {
&-clickable {
.@{tag-prefix} {
cursor: pointer;
}
}
&-compact {
&:not(.@{space-prefix}-vertical) {
> .@{space-prefix}-item:first-child > .@{tag-prefix} {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
> .@{space-prefix}-item:last-child > .@{tag-prefix} {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
> .@{space-prefix}-item:not(:first-child):not(:last-child) > .@{tag-prefix} {
border-radius: 0;
}
> .@{space-prefix}-item:not(:last-child) > .@{tag-prefix}.@{tag-prefix}-bordered {
margin-right: -1px;
}
}
}
}
.tag-status-color(@status) {
@color: '--ix-color-@{status}';
@background-color: '--ix-tag-@{status}-bg-color';
@background-color-filled: '--ix-color-@{status}-bg';
@icon-color: '--ix-color-@{status}-icon';
&-@{status} {
--ix-tag-color: ~'var(@{color})';
--ix-tag-background-color: ~'var(@{background-color})';
.@{tag-prefix}-close-icon {
color: ~'var(@{icon-color})';
}
}
&-@{status}&-bordered {
--ix-tag-border-color: ~'var(@{color})';
}
&-@{status}&-filled {
--ix-tag-background-color: ~'var(@{background-color-filled})';
}
}