1+ // Form fields
2+
3+ $field-background-colour : $whiteF8 ;
4+ $field-border-colour : $greyD8 ;
5+ $field-text-colour : $off-black ;
6+ $field-text-focus-colour : $off-black ;
7+ $invalid-field-colour : $yellow ;
8+ $invalid-text-field-colour : $darker-yellow ;
9+ $field-placeholder-colour : $grey9B ;
10+
11+ .formField {
12+ margin : 0 0 em (40 ) 0 ;
13+ padding : 0 ;
14+ }
15+
16+ %focusStyling {
17+ border-color : $field-text-focus-colour ;
18+ color : $field-text-focus-colour ;
19+ }
20+
21+ input [type = " text" ],
22+ input [type = " tel" ],
23+ input [type = " email" ],
24+ input [type = " password" ],
25+ input [type = " search" ],
26+ input [type = " number" ],
27+ input [type = " tel" ],
28+ select ,
29+ textarea {
30+ @extend %base-font ;
31+ @include box-sizing ;
32+ display : inline-block ;
33+ background-color : $field-background-colour ;
34+ border : 1px solid $field-border-colour ;
35+ border-radius : $border-radius ;
36+ font-size : $base-font-size ;
37+ color : $field-text-colour ;
38+ outline : none ;
39+ padding : em (8 );
40+ width : 100% ;
41+ }
42+
43+ input [type = " text" ].inline ,
44+ input [type = " tel" ].inline ,
45+ input [type = " email" ].inline ,
46+ input [type = " password" ].inline ,
47+ input [type = " search" ].inline ,
48+ input [type = " number" ].inline ,
49+ input [type = " tel" ].inline ,
50+ select .inline ,
51+ textarea .inline {
52+ width : auto ;
53+ }
54+
55+ select {
56+ padding : em (7 ) em (24 ) em (7 ) em (12 );
57+ -webkit-appearance : none ;
58+ }
59+
60+ input [type = " text" ]:focus ,
61+ input [type = " tel" ]:focus ,
62+ input [type = " email" ]:focus ,
63+ input [type = " search" ]:focus ,
64+ input [type = " password" ]:focus ,
65+ input [type = " number" ]:focus ,
66+ input [type = " tel" ]:focus ,
67+ select :focus ,
68+ textarea :focus {
69+ @extend %focusStyling ;
70+ background-color : $field-background-colour ;
71+ }
72+
73+ input .ng-invalid.ng-touched ,
74+ select .ng-invalid.ng-touched ,
75+ textarea .ng-invalid.ng-touched {
76+ border-bottom : 1px solid $invalid-field-colour ;
77+ }
78+
79+ .input-errors-container {
80+ position : relative ;
81+ }
82+
83+ .input-error {
84+ position : absolute ;
85+ top : em (5 );
86+ color : $invalid-text-field-colour ;
87+ }
88+
89+ :-webkit-autofill {
90+ -webkit-text-fill-color : $field-text-colour ;
91+ -webkit-box-shadow : 0 0 0 1000px $white inset ;
92+
93+ & :focus {
94+ -webkit-text-fill-color : $field-text-focus-colour ;
95+ }
96+ }
97+
98+ :-moz-autofill {
99+ -moz-text-fill-color : $field-text-colour ;
100+ -moz-box-shadow : 0 0 0 1000px $white inset ;
101+
102+ & :focus {
103+ -webkit-text-fill-color : $field-text-focus-colour ;
104+ }
105+ }
106+
107+ :-o-autofill {
108+ -o-text-fill-color : $field-text-colour ;
109+ -o-box-shadow : 0 0 0 1000px $white inset ;
110+
111+ & :focus {
112+ -webkit-text-fill-color : $field-text-focus-colour ;
113+ }
114+ }
115+
116+ ::-webkit-input-placeholder { /* WebKit, Blink, Edge */
117+ color : $field-placeholder-colour ;
118+ }
119+
120+ :-moz-placeholder { /* Firefox 4-18 */
121+ color : $field-placeholder-colour ;
122+ opacity : 1 ;
123+ }
124+
125+ ::-moz-placeholder { /* Firefox 19+ */
126+ color : $field-placeholder-colour ;
127+ opacity : 1 ;
128+ }
129+
130+ :-ms-input-placeholder { /* Internet Explorer 10-11 */
131+ color : $field-placeholder-colour ;
132+ }
133+
134+ ::-ms-input-placeholder { /* Microsoft Edge */
135+ color : $field-placeholder-colour ;
136+ }
137+
138+ /* ** Custom arrow on HTML tag select only for IE8, IE9 ***/
139+ /* ** display none for this following element is for all the other browsers ***/
140+ .selectTagWrapper :before {
141+ display : none ;
142+ }
143+
144+ .lt-ie9 .selectTagWrapper ,
145+ .ie9 .selectTagWrapper {
146+ position : relative ;
147+ border : 1px solid $field-border-colour ;
148+ overflow : hidden ;
149+ width : 100% ;
150+ }
151+
152+ .lt-ie9 .selectTagWrapper :before ,
153+ .ie9 .selectTagWrapper :before {
154+ display : block ;
155+ position : absolute ;
156+ top : 40% ;
157+ left : 95% ;
158+ font-size : em (5 );
159+ width : 100% ;
160+ }
161+
162+ .lt-ie9 .selectTagWrapper > select ,
163+ .ie9 .selectTagWrapper > select {
164+ border : none ;
165+ width : 125% ;
166+ }
0 commit comments