1 | @charset "UTF-8";
|
2 |
|
3 | @import "../core/index-noreset.scss";
|
4 | @import "scss/mixin";
|
5 | @import "scss/variable";
|
6 |
|
7 | #{$number-picker-prefix} {
|
8 | @include box-sizing;
|
9 | display: inline-block;
|
10 |
|
11 |
|
12 | .#{$css-prefix}btn {
|
13 | padding: 0 !important;
|
14 | line-height: 0 !important;
|
15 | box-shadow: none !important;
|
16 | }
|
17 |
|
18 | &-normal {
|
19 | .#{$css-prefix}input {
|
20 | width: 100%;
|
21 |
|
22 | .#{$css-prefix}input-control {
|
23 | padding-right: 0;
|
24 | height: 100%;
|
25 | }
|
26 | }
|
27 |
|
28 | &:not(#{$number-picker-prefix}-no-trigger) .#{$css-prefix}input input {
|
29 | padding-right: 2px;
|
30 | }
|
31 |
|
32 | .#{$css-prefix}btn {
|
33 | display: block;
|
34 |
|
35 | &:hover {
|
36 | z-index: 1;
|
37 | }
|
38 |
|
39 | &:first-child {
|
40 | border-right: none;
|
41 | border-top: none;
|
42 | height: calc(50%);
|
43 | border-top-left-radius: 0;
|
44 | border-bottom-left-radius: 0;
|
45 | border-bottom-right-radius: 0;
|
46 | }
|
47 |
|
48 | &:last-child {
|
49 | border-right: none;
|
50 | border-bottom: none;
|
51 | margin-top: -1px;
|
52 | height: calc(50% + 1px);
|
53 | border-top-left-radius: 0;
|
54 | border-bottom-left-radius: 0;
|
55 | border-top-right-radius: 0;
|
56 | }
|
57 | }
|
58 |
|
59 | #{$number-picker-prefix}-handler {
|
60 | transition: opacity $motion-duration-immediately $motion-linear;
|
61 | height: 100%;
|
62 | display: block;
|
63 | }
|
64 |
|
65 | &:not(#{$number-picker-prefix}-show-trigger) #{$number-picker-prefix}-handler {
|
66 | opacity: 0;
|
67 | }
|
68 |
|
69 | &:hover #{$number-picker-prefix}-handler,
|
70 | &.hover #{$number-picker-prefix}-handler {
|
71 | opacity: 1;
|
72 | }
|
73 |
|
74 | .#{$css-prefix}input.#{$css-prefix}disabled #{$number-picker-prefix}-handler {
|
75 | opacity: 0;
|
76 | }
|
77 |
|
78 | #{$number-picker-prefix}-up-icon::before {
|
79 | content: $number-picker-normal-up-icon;
|
80 | }
|
81 |
|
82 | #{$number-picker-prefix}-down-icon::before {
|
83 | content: $number-picker-normal-down-icon;
|
84 | }
|
85 |
|
86 | &.#{$css-prefix}small {
|
87 | width: 68px;
|
88 |
|
89 | .#{$css-prefix}btn {
|
90 | width: $number-picker-normal-s-button-width;
|
91 |
|
92 | &:first-child {
|
93 | border-top-right-radius: $form-element-small-corner;
|
94 | }
|
95 |
|
96 | &:last-child {
|
97 | border-bottom-right-radius: $form-element-small-corner;
|
98 | }
|
99 | }
|
100 |
|
101 | .#{$css-prefix}icon {
|
102 | @include icon-size($number-picker-normal-s-button-icon-size);
|
103 | }
|
104 | }
|
105 |
|
106 | &.#{$css-prefix}medium {
|
107 | width: $number-picker-normal-m-input-width;
|
108 |
|
109 | .#{$css-prefix}btn {
|
110 | width: $number-picker-normal-m-button-width;
|
111 |
|
112 | &:first-child {
|
113 | border-top-right-radius: $form-element-medium-corner;
|
114 | }
|
115 |
|
116 | &:last-child {
|
117 | border-bottom-right-radius: $form-element-medium-corner;
|
118 | }
|
119 | }
|
120 |
|
121 | .#{$css-prefix}icon {
|
122 | @include icon-size($number-picker-normal-m-button-icon-size);
|
123 | }
|
124 | }
|
125 |
|
126 | &.#{$css-prefix}large {
|
127 | width: $number-picker-normal-l-input-width;
|
128 |
|
129 | .#{$css-prefix}btn {
|
130 | width: $number-picker-normal-l-button-width;
|
131 |
|
132 | &:first-child {
|
133 | border-top-right-radius: $form-element-large-corner;
|
134 | }
|
135 |
|
136 | &:last-child {
|
137 | border-bottom-right-radius: $form-element-large-corner;
|
138 | }
|
139 | }
|
140 |
|
141 | .#{$css-prefix}icon {
|
142 | @include icon-size($number-picker-normal-l-button-icon-size);
|
143 | }
|
144 | }
|
145 | }
|
146 |
|
147 | &-inline {
|
148 | input {
|
149 | text-align: center;
|
150 | }
|
151 |
|
152 | .#{$css-prefix}input input {
|
153 | padding: 0;
|
154 | }
|
155 |
|
156 | #{$number-picker-prefix}-add-icon::before {
|
157 | content: $number-picker-inline-add-icon;
|
158 | }
|
159 |
|
160 | #{$number-picker-prefix}-minus-icon::before {
|
161 | content: $number-picker-inline-minus-icon;
|
162 | }
|
163 |
|
164 | &.#{$css-prefix}small {
|
165 | width: 68px;
|
166 | min-width: calc(#{$form-element-small-height} * 3);
|
167 |
|
168 | .#{$css-prefix}icon {
|
169 | @include icon-size($number-picker-inline-s-button-icon-size);
|
170 | }
|
171 |
|
172 | .#{$css-prefix}btn {
|
173 | height: $form-element-small-height;
|
174 | }
|
175 |
|
176 | .#{$css-prefix}before .#{$css-prefix}btn {
|
177 | margin-right: $number-picker-inline-s-button-margin;
|
178 | border-top-left-radius: $number-picker-inline-s-button-corner;
|
179 | border-bottom-left-radius: $number-picker-inline-s-button-corner;
|
180 | }
|
181 |
|
182 | .#{$css-prefix}after .#{$css-prefix}btn {
|
183 | margin-left: $number-picker-inline-s-button-margin;
|
184 | border-top-right-radius: $number-picker-inline-s-button-corner;
|
185 | border-bottom-right-radius: $number-picker-inline-s-button-corner;
|
186 | }
|
187 | }
|
188 |
|
189 | &.#{$css-prefix}medium {
|
190 | width: $number-picker-inline-m-input-width;
|
191 | min-width: calc(#{$form-element-medium-height} * 3);
|
192 |
|
193 | .#{$css-prefix}icon {
|
194 | @include icon-size($number-picker-inline-m-button-icon-size);
|
195 | }
|
196 |
|
197 | .#{$css-prefix}btn {
|
198 | height: $form-element-medium-height;
|
199 | }
|
200 |
|
201 | .#{$css-prefix}before .#{$css-prefix}btn {
|
202 | margin-right: $number-picker-inline-m-button-margin;
|
203 | border-top-left-radius: $number-picker-inline-m-button-corner;
|
204 | border-bottom-left-radius: $number-picker-inline-m-button-corner;
|
205 | }
|
206 |
|
207 | .#{$css-prefix}after .#{$css-prefix}btn {
|
208 | margin-left: $number-picker-inline-m-button-margin;
|
209 | border-top-right-radius: $number-picker-inline-m-button-corner;
|
210 | border-bottom-right-radius: $number-picker-inline-m-button-corner;
|
211 | }
|
212 | }
|
213 |
|
214 | &.#{$css-prefix}large {
|
215 | width: $number-picker-inline-l-input-width;
|
216 | min-width: calc(#{$form-element-large-height} * 3);
|
217 |
|
218 | .#{$css-prefix}icon {
|
219 | @include icon-size($number-picker-inline-l-button-icon-size);
|
220 | }
|
221 |
|
222 | .#{$css-prefix}btn {
|
223 | height: $form-element-large-height;
|
224 | }
|
225 |
|
226 | .#{$css-prefix}before .#{$css-prefix}btn {
|
227 | margin-right: $number-picker-inline-l-button-margin;
|
228 | border-top-left-radius: $number-picker-inline-l-button-corner;
|
229 | border-bottom-left-radius: $number-picker-inline-l-button-corner;
|
230 | }
|
231 |
|
232 | .#{$css-prefix}after .#{$css-prefix}btn {
|
233 | margin-left: $number-picker-inline-l-button-margin;
|
234 | border-top-right-radius: $number-picker-inline-l-button-corner;
|
235 | border-bottom-right-radius: $number-picker-inline-l-button-corner;
|
236 | }
|
237 | }
|
238 |
|
239 | .#{$css-prefix}btn {
|
240 | &.#{$css-prefix}small {
|
241 | width: $form-element-small-height;
|
242 | }
|
243 |
|
244 | &.#{$css-prefix}medium {
|
245 | width: $form-element-medium-height;
|
246 | }
|
247 |
|
248 | &.#{$css-prefix}large {
|
249 | width: $form-element-large-height;
|
250 | }
|
251 | }
|
252 | }
|
253 | }
|
254 |
|
255 | @-moz-document url-prefix() {
|
256 | #{$number-picker-prefix}-normal {
|
257 | &.#{$css-prefix}small #{$number-picker-prefix}-handler {
|
258 | height: calc(#{$form-element-small-height} - 2px);
|
259 | }
|
260 |
|
261 | &.#{$css-prefix}medium #{$number-picker-prefix}-handler {
|
262 | height: calc(#{$form-element-medium-height} - 2px);
|
263 | }
|
264 |
|
265 | &.#{$css-prefix}large #{$number-picker-prefix}-handler {
|
266 | height: calc(#{$form-element-large-height} - 2px);
|
267 | }
|
268 | }
|
269 | }
|
270 |
|
271 | #{$number-picker-prefix}-normal[dir="rtl"] {
|
272 | .#{$css-prefix}btn {
|
273 | &:first-child {
|
274 | border-right: 1px solid $color-line1-3;
|
275 | border-left: 0;
|
276 | border-top-right-radius: 0;
|
277 |
|
278 | &.#{$css-prefix}small {
|
279 | border-top-left-radius: $form-element-small-corner;
|
280 | }
|
281 |
|
282 | &.#{$css-prefix}medium {
|
283 | border-top-left-radius: $form-element-medium-corner;
|
284 | }
|
285 |
|
286 | &.#{$css-prefix}large {
|
287 | border-top-left-radius: $form-element-large-corner;
|
288 | }
|
289 | }
|
290 |
|
291 | &:last-child {
|
292 | border-right: 1px solid $color-line1-3;
|
293 | border-left: 0;
|
294 | border-bottom-right-radius: 0;
|
295 |
|
296 | &.#{$css-prefix}small {
|
297 | border-bottom-left-radius: $form-element-small-corner;
|
298 | }
|
299 |
|
300 | &.#{$css-prefix}medium {
|
301 | border-bottom-left-radius: $form-element-medium-corner;
|
302 | }
|
303 |
|
304 | &.#{$css-prefix}large {
|
305 | border-bottom-left-radius: $form-element-large-corner;
|
306 | }
|
307 | }
|
308 | }
|
309 |
|
310 | .#{$css-prefix}input .#{$css-prefix}input-control {
|
311 | padding-left: 0;
|
312 | }
|
313 | }
|
314 |
|
315 | #{$number-picker-prefix}-inline[dir="rtl"] {
|
316 | .#{$css-prefix}before .#{$css-prefix}btn {
|
317 | margin-right: 0;
|
318 |
|
319 | &.#{$css-prefix}small {
|
320 | margin-left: $number-picker-inline-s-button-margin;
|
321 | border-top-right-radius: $number-picker-inline-s-button-corner !important;
|
322 | border-bottom-right-radius: $number-picker-inline-s-button-corner !important;
|
323 | }
|
324 |
|
325 | &.#{$css-prefix}medium {
|
326 | margin-left: $number-picker-inline-m-button-margin;
|
327 | border-top-right-radius: $number-picker-inline-m-button-corner !important;
|
328 | border-bottom-right-radius: $number-picker-inline-m-button-corner !important;
|
329 | }
|
330 |
|
331 | &.#{$css-prefix}large {
|
332 | margin-left: $number-picker-inline-l-button-margin;
|
333 | border-top-right-radius: $number-picker-inline-l-button-corner !important;
|
334 | border-bottom-right-radius: $number-picker-inline-l-button-corner !important;
|
335 | }
|
336 | }
|
337 |
|
338 | .#{$css-prefix}after .#{$css-prefix}btn {
|
339 | margin-left: 0;
|
340 |
|
341 | &.#{$css-prefix}small {
|
342 | margin-right: $number-picker-inline-s-button-margin;
|
343 | border-top-left-radius: $number-picker-inline-s-button-corner !important;
|
344 | border-bottom-left-radius: $number-picker-inline-s-button-corner !important;
|
345 | }
|
346 |
|
347 | &.#{$css-prefix}medium {
|
348 | margin-right: $number-picker-inline-m-button-margin;
|
349 | border-top-left-radius: $number-picker-inline-m-button-corner !important;
|
350 | border-bottom-left-radius: $number-picker-inline-m-button-corner !important;
|
351 | }
|
352 |
|
353 | &.#{$css-prefix}large {
|
354 | margin-right: $number-picker-inline-l-button-margin;
|
355 | border-top-left-radius: $number-picker-inline-l-button-corner !important;
|
356 | border-bottom-left-radius: $number-picker-inline-l-button-corner !important;
|
357 | }
|
358 | }
|
359 | }
|