Blame view

src/styles/components/input-number.less 4.28 KB
95436eeb   梁灏   add InputNumber UI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  @input-number-prefix-cls: ~"@{css-prefix}input-number";
  
  .handler-disabled() {
      opacity: 0.72;
      color: #ccc !important;
      cursor: @cursor-disabled;
  }
  
  .@{input-number-prefix-cls} {
      @radius-wrap: 0 @btn-border-radius @btn-border-radius 0;
  
      .input;
      margin: 0;
      padding: 0;
      width: 80px;
3c01d81a   梁灏   fixed Modal bug,w...
16
17
      height: @input-height-base;
      line-height: @input-height-base;
95436eeb   梁灏   add InputNumber UI
18
19
20
21
      vertical-align: middle;
      border: 1px solid @border-color-base;
      border-radius: @btn-border-radius;
      overflow: hidden;
c6653940   houfeng   fix input-number ...
22
      cursor: default;
95436eeb   梁灏   add InputNumber UI
23
24
25
26
27
28
29
30
31
32
33
  
      &-handler-wrap {
          width: 22px;
          height: 100%;
          border-left: 1px solid @border-color-base;
          border-radius: @radius-wrap;
          background: #fff;
          position: absolute;
          top: 0;
          right: 0;
          opacity: 0;
e2645048   jingsam   :fire: remove tra...
34
          transition: opacity @transition-time @ease-in-out;
95436eeb   梁灏   add InputNumber UI
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
      }
  
      &:hover &-handler-wrap {
          opacity: 1;
      }
  
      &-handler-up {
          cursor: pointer;
          &-inner {
              top: 1px;
          }
      }
  
      &-handler-down {
          border-top: 1px solid @border-color-base;
          top: -1px;
          cursor: pointer;
      }
  
      &-handler {
          display: block;
          width: 100%;
3c01d81a   梁灏   fixed Modal bug,w...
57
          height: @input-height-base / 2;
95436eeb   梁灏   add InputNumber UI
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
          line-height: 0;
          text-align: center;
          overflow: hidden;
          color: #999;
          position: relative;
  
          &:hover &-up-inner,
          &:hover &-down-inner {
              color: tint(@primary-color, 20%);
          }
      }
  
      &-handler-up-inner,
      &-handler-down-inner {
          width: 12px;
          height: 12px;
          line-height: 12px;
          font-size: 14px;
          color: #999;
e2645048   jingsam   :fire: remove tra...
77
          user-select: none;
95436eeb   梁灏   add InputNumber UI
78
          position: absolute;
3931a827   梁灏   update InputNumbe...
79
          right: 5px;
e2645048   jingsam   :fire: remove tra...
80
          transition: all @transition-time linear;
95436eeb   梁灏   add InputNumber UI
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
      }
  
      &:hover {
          .hover();
      }
  
      &-focused {
          .active();
      }
  
      &-disabled {
          .disabled();
      }
  
      &-input-wrap {
          overflow: hidden;
3c01d81a   梁灏   fixed Modal bug,w...
97
          height: @input-height-base;
95436eeb   梁灏   add InputNumber UI
98
99
100
101
      }
  
      &-input {
          width: 100%;
3c01d81a   梁灏   fixed Modal bug,w...
102
103
          height: @input-height-base;
          line-height: @input-height-base;
95436eeb   梁灏   add InputNumber UI
104
105
106
107
108
109
110
          padding: 0 7px;
          text-align: left;
          outline: 0;
          -moz-appearance: textfield;
          color: #666;
          border: 0;
          border-radius: @btn-border-radius;
e2645048   jingsam   :fire: remove tra...
111
          transition: all @transition-time linear;
95436eeb   梁灏   add InputNumber UI
112
113
114
115
  
          &[disabled] {
              .disabled();
          }
6d569b6a   梁灏   fix #5053
116
117
118
119
  
          &::placeholder {
              color: @input-placeholder-color;
          }
95436eeb   梁灏   add InputNumber UI
120
121
122
123
124
      }
  
      &-large {
          padding: 0;
          .@{input-number-prefix-cls}-input-wrap {
3c01d81a   梁灏   fixed Modal bug,w...
125
              height: @input-height-large;
95436eeb   梁灏   add InputNumber UI
126
127
          }
          .@{input-number-prefix-cls}-handler {
3c01d81a   梁灏   fixed Modal bug,w...
128
              height: @input-height-large / 2;
95436eeb   梁灏   add InputNumber UI
129
130
131
          }
  
          input {
3c01d81a   梁灏   fixed Modal bug,w...
132
133
              height: @input-height-large;
              line-height: @input-height-large;
95436eeb   梁灏   add InputNumber UI
134
135
136
137
138
139
140
141
142
143
144
145
146
          }
  
          .@{input-number-prefix-cls}-handler-up-inner {
              top: 2px;
          }
          .@{input-number-prefix-cls}-handler-down-inner {
              bottom: 2px;
          }
      }
  
      &-small {
          padding: 0;
          .@{input-number-prefix-cls}-input-wrap {
3c01d81a   梁灏   fixed Modal bug,w...
147
              height: @input-height-small;
95436eeb   梁灏   add InputNumber UI
148
149
          }
          .@{input-number-prefix-cls}-handler {
3c01d81a   梁灏   fixed Modal bug,w...
150
              height: @input-height-small / 2;
95436eeb   梁灏   add InputNumber UI
151
152
153
          }
  
          input {
3c01d81a   梁灏   fixed Modal bug,w...
154
155
              height: @input-height-small;
              line-height: @input-height-small;
95436eeb   梁灏   add InputNumber UI
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
              margin-top: -1px;
              vertical-align: top;
          }
          .@{input-number-prefix-cls}-handler-up-inner {
              top: -1px;
          }
          .@{input-number-prefix-cls}-handler-down-inner {
              bottom: -1px;
          }
      }
  
  
  
      &-handler-down-disabled,
      &-handler-up-disabled,
      &-disabled {
          .@{input-number-prefix-cls}-handler-down-inner,
          .@{input-number-prefix-cls}-handler-up-inner {
              .handler-disabled();
          }
      }
  
      &-disabled {
          .@{input-number-prefix-cls}-input {
              opacity: 0.72;
              cursor: @cursor-disabled;
              background-color: #f3f3f3;
          }
          .@{input-number-prefix-cls}-handler-wrap {
              display: none;
          }
          .@{input-number-prefix-cls}-handler {
              .handler-disabled();
          }
      }
e2645048   jingsam   :fire: remove tra...
191
  }
e93f1e9a   梁灏   update some styles
192
193
194
195
196
197
198
199
  
  .@{form-item-prefix-cls}-error {
      .@{input-number-prefix-cls}{
          .input-error;
          &-focused {
              .active-error;
          }
      }
c6653940   houfeng   fix input-number ...
200
  }