1 | @charset "UTF-8";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | @mixin input-size(
|
7 | $height,
|
8 | $padding,
|
9 | $fontSize,
|
10 | $labelPadding,
|
11 | $iconPadding
|
12 | ) {
|
13 | height: $height;
|
14 | #{$input-prefix}-label {
|
15 | padding-left: $labelPadding;
|
16 | font-size: $fontSize;
|
17 | }
|
18 | #{$input-prefix}-inner {
|
19 | font-size: $fontSize;
|
20 | }
|
21 | #{$input-prefix}-control {
|
22 | padding-right: $iconPadding;
|
23 | }
|
24 | #{$input-prefix}-inner-text {
|
25 | padding-right: $iconPadding;
|
26 | }
|
27 | input {
|
28 | height: calc(#{$height} - #{$input-border-width} * 2);
|
29 | line-height: calc((#{$height} - #{$input-border-width}*2))\0;
|
30 | padding: 0 $padding;
|
31 | font-size: $fontSize;
|
32 | &::placeholder {
|
33 | font-size: $fontSize;
|
34 | }
|
35 | }
|
36 |
|
37 |
|
38 | #{$input-prefix}-text-field {
|
39 | padding: 0 $padding;
|
40 | font-size: $fontSize;
|
41 | height: calc(#{$height} - #{$input-border-width} * 2);
|
42 | line-height: calc(#{$height} - #{$input-border-width} * 2);
|
43 | }
|
44 | }
|
45 |
|
46 |
|
47 | @mixin input-size-rtl(
|
48 | $labelPadding,
|
49 | $iconPadding
|
50 | ) {
|
51 | #{$input-prefix}-label {
|
52 | padding-left: 0;
|
53 | padding-right: $labelPadding;
|
54 | }
|
55 | #{$input-prefix}-control {
|
56 | padding-right: 0;
|
57 | padding-left: $iconPadding;
|
58 | }
|
59 | }
|
60 |
|
61 | @mixin input-border-radius($size) {
|
62 | border-radius: $size;
|
63 | #{$input-prefix}-control {
|
64 | border-radius: 0 $size $size 0;
|
65 | }
|
66 | }
|
67 |
|
68 | @mixin input-icon-size($size) {
|
69 | .#{$css-prefix}icon {
|
70 | @include icon-size($size);
|
71 | }
|
72 | }
|
73 |
|
74 | @mixin input-addon-size(
|
75 | $fontSize
|
76 | ) {
|
77 | font-size: $fontSize;
|
78 | }
|
79 |
|
80 |
|
81 | @mixin input-placeholder($color) {
|
82 |
|
83 | &::-moz-placeholder {
|
84 | color: $color;
|
85 | opacity: 1;
|
86 | }
|
87 |
|
88 | &:-ms-input-placeholder {
|
89 | color: $color;
|
90 | }
|
91 |
|
92 | &::-webkit-input-placeholder {
|
93 | color: $color;
|
94 | }
|
95 | }
|
96 |
|
97 | @mixin input-disabled() {
|
98 | color: $input-disabled-color;
|
99 | border-color: $input-disabled-border-color;
|
100 | background-color: $input-disabled-bg-color;
|
101 | cursor: not-allowed;
|
102 |
|
103 | &:hover {
|
104 | border-color: $input-disabled-border-color;
|
105 | background-color: $input-disabled-bg-color;
|
106 | }
|
107 | }
|
108 |
|
109 | @mixin input-focus-style() {
|
110 | border-color: $input-focus-border-color;
|
111 | background-color: $input-focus-bg-color;
|
112 | }
|
113 |
|
114 | @mixin input-style() {
|
115 | border: $input-border-width solid $input-border-color;
|
116 | background-color: $input-bg-color;
|
117 | border-radius: $form-element-medium-corner;
|
118 |
|
119 | &:hover {
|
120 | border-color: $input-hover-border-color;
|
121 | background-color: $input-hover-bg-color;
|
122 | }
|
123 |
|
124 | &:focus {
|
125 | @include input-focus-style();
|
126 | }
|
127 | }
|
128 |
|
129 | @mixin input-height(
|
130 | $height,
|
131 | $borderWidth
|
132 | ) {
|
133 | height: $height;
|
134 | input {
|
135 | height: calc(#{$height} - #{$borderWidth} * 2);
|
136 | line-height: calc(#{$height} - #{$borderWidth} * 2)\0;
|
137 | }
|
138 | }
|