Blame view

src/styles/components/tag.less 4.34 KB
4ec205b6   梁灏   add Tag UI
1
2
3
4
5
6
7
8
9
  @tag-prefix-cls: ~"@{css-prefix}tag";
  @tag-close-prefix-cls: ivu-icon-ios-close-empty;
  
  .@{tag-prefix-cls} {
      display: inline-block;
      height: 22px;
      line-height: 22px;
      margin: 2px 4px 2px 0;
      padding: 0 8px;
4ec205b6   梁灏   add Tag UI
10
      border: 1px solid @border-color-split;
382c000c   梁灏   Tag add type prop...
11
      border-radius: @btn-border-radius-small;
4ec205b6   梁灏   add Tag UI
12
13
14
15
16
17
      background: @background-color-base;
      font-size: @tag-font-size;
      vertical-align: middle;
      opacity: 1;
      overflow: hidden;
      cursor: pointer;
e2645048   jingsam   :fire: remove tra...
18
      //transition: all @transition-time @ease-in-out;
4ec205b6   梁灏   add Tag UI
19
  
382c000c   梁灏   Tag add type prop...
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
      &-dot{
          height: 32px;
          line-height: 32px;
          border: 1px solid @border-color-split !important;
          color: @text-color !important;
          background: #fff !important;
          padding: 0 12px;
  
          &-inner{
              display: inline-block;
              width: 12px;
              height: 12px;
              margin-right: 8px;
              border-radius: 50%;
              background: @border-color-split;
              position: relative;
              top: 1px;
          }
          .@{tag-close-prefix-cls} {
              color: #666 !important;
              margin-left: 12px !important;
          }
      }
  
      &-border{
          height: 24px;
          line-height: 24px;
          border: 1px solid @border-color-split !important;
          color: @text-color !important;
          background: #fff !important;
          position: relative;
  
          .@{tag-close-prefix-cls} {
              color: #666 !important;
              margin-left: 12px !important;
          }
  
          &:after{
              content: "";
              display: none;
              width: 1px;
              background: @border-color-split;
              position: absolute;
              top: 0;
              bottom: 0;
              right: 22px;
          }
  
          &.@{tag-prefix-cls}-closable {
              &:after{
                  display: block;
              }
              .@{tag-close-prefix-cls} {
                  margin-left: 18px !important;
              }
          }
  
          &.@{tag-prefix-cls}-blue {
              color: @link-color !important;
b094c2b6   梁灏   optimize Tag bord...
79
80
81
82
83
84
85
86
              border: 1px solid @link-color !important;
  
              &:after{
                  background: @link-color;
              }
              .@{tag-close-prefix-cls}{
                  color: @link-color !important;
              }
382c000c   梁灏   Tag add type prop...
87
88
89
          }
          &.@{tag-prefix-cls}-green {
              color: @success-color !important;
b094c2b6   梁灏   optimize Tag bord...
90
91
92
93
94
95
96
97
              border: 1px solid @success-color !important;
  
              &:after{
                  background: @success-color;
              }
              .@{tag-close-prefix-cls}{
                  color: @success-color !important;
              }
382c000c   梁灏   Tag add type prop...
98
99
100
          }
          &.@{tag-prefix-cls}-yellow {
              color: @warning-color !important;
b094c2b6   梁灏   optimize Tag bord...
101
102
103
104
105
106
107
108
              border: 1px solid @warning-color !important;
  
              &:after{
                  background: @warning-color;
              }
              .@{tag-close-prefix-cls}{
                  color: @warning-color !important;
              }
382c000c   梁灏   Tag add type prop...
109
110
111
          }
          &.@{tag-prefix-cls}-red {
              color: @error-color !important;
b094c2b6   梁灏   optimize Tag bord...
112
113
114
115
116
117
118
119
              border: 1px solid @error-color !important;
  
              &:after{
                  background: @error-color;
              }
              .@{tag-close-prefix-cls}{
                  color: @error-color !important;
              }
382c000c   梁灏   Tag add type prop...
120
121
122
          }
      }
  
4ec205b6   梁灏   add Tag UI
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
      &:hover {
          opacity: 0.85;
      }
  
      &,
      a,
      a:hover {
          color: @text-color;
      }
  
      &-text {
          a:first-child:last-child {
              display: inline-block;
              margin: 0 -8px;
              padding: 0 8px;
          }
      }
  
      .@{tag-close-prefix-cls} {
          .iconfont-size-under-12px(20px);
          cursor: pointer;
382c000c   梁灏   Tag add type prop...
144
          margin-left: 8px;
4ec205b6   梁灏   add Tag UI
145
146
147
148
          color: #666;
          opacity: 0.66;
          position: relative;
          top: 1px;
e2645048   jingsam   :fire: remove tra...
149
          //transition: all @transition-time @ease-in-out;
4ec205b6   梁灏   add Tag UI
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
  
          &:hover {
              opacity: 1;
          }
      }
  
      &-blue,
      &-green,
      &-yellow,
      &-red {
          border: 0;
          &,
          a,
          a:hover,
          .@{tag-close-prefix-cls},
          .@{tag-close-prefix-cls}:hover {
              color: #fff;
          }
      }
  
382c000c   梁灏   Tag add type prop...
170
171
172
      &-blue,
      &-blue&-dot &-dot-inner
      {
4ec205b6   梁灏   add Tag UI
173
174
175
          background: @link-color;
      }
  
382c000c   梁灏   Tag add type prop...
176
177
178
      &-green,
      &-green&-dot &-dot-inner
      {
4ec205b6   梁灏   add Tag UI
179
180
181
          background: @success-color;
      }
  
382c000c   梁灏   Tag add type prop...
182
183
184
      &-yellow,
      &-yellow&-dot &-dot-inner
      {
4ec205b6   梁灏   add Tag UI
185
186
187
          background: @warning-color;
      }
  
382c000c   梁灏   Tag add type prop...
188
189
190
      &-red,
      &-red&-dot &-dot-inner
      {
4ec205b6   梁灏   add Tag UI
191
192
          background: @error-color;
      }
e2645048   jingsam   :fire: remove tra...
193
  }