forked from catamphetamine/react-phone-number-input
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
179 lines (152 loc) · 3.91 KB
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
.react-phone-number-input__row
{
/* This is done to stretch the contents of this component */
display : flex;
align-items : center;
}
.react-phone-number-input__phone
{
/* The phone number input stretches to fill all empty space */
flex : 1;
/* The phone number input should shrink
to make room for the extension input */
min-width : 0;
}
.react-phone-number-input__icon
{
/* The flag icon size is 4x3 hence the exact `width` and `height` values */
width : 1.24em;
height : 0.93em;
/* `1px` is still too much for a "retina" screen but there's no way in CSS to specify "hairline" border width. */
border : 1px solid rgba(0, 0, 0, 0.5);
/* Makes sure `width`x`height` is exactly `4x3` and `border` width is not included in it */
box-sizing : content-box;
}
.react-phone-number-input__icon--international
{
/* The international icon size is square */
/* and also has no border hence the `2 * 1px` `width` and `height` compensation */
width : calc(0.93em + 2px);
height : calc(0.93em + 2px);
/* The international icon size is square hence the exact `padding` value */
/* for precise alignment with `4x3` sized country flags. */
padding-left : 0.155em;
padding-right : 0.155em;
border : none;
}
.react-phone-number-input__error
{
margin-left : calc(1.24em + 2px + 0.3em + 0.35em + 0.5em);
margin-top : calc(0.3rem);
color : #D30F00;
}
.react-phone-number-input__icon-image
{
max-width : 100%;
max-height : 100%;
}
/* Removes `<input type="number"/>` up/down arrows in Webkit browsers. */
.react-phone-number-input__ext-input::-webkit-inner-spin-button,
.react-phone-number-input__ext-input::-webkit-outer-spin-button
{
margin : 0 !important;
-webkit-appearance : none !important;
-moz-appearance : textfield !important;
}
.react-phone-number-input__ext-input
{
width : 3em;
}
.react-phone-number-input__ext
{
white-space: nowrap;
}
.react-phone-number-input__ext,
.react-phone-number-input__ext-input
{
margin-left : 0.5em;
}
/* Styling native country `<select/>`. */
.react-phone-number-input__country--native
{
position : relative;
align-self : stretch;
display : flex;
align-items : center;
margin-right : 0.5em;
}
.react-phone-number-input__country-select
{
position : absolute;
top : 0;
left : 0;
height : 100%;
width : 100%;
z-index : 1;
border : 0;
opacity : 0;
cursor : pointer;
}
.react-phone-number-input__country-select-arrow
{
display : block;
content : '';
width : 0;
height : 0;
margin-bottom : 0.1em;
margin-top : 0.3em;
margin-left : 0.3em;
border-width : 0.35em 0.2em 0 0.2em;
border-style : solid;
border-left-color : transparent;
border-right-color : transparent;
color : #B8BDC4;
opacity : 0.7;
transition : color 0.1s;
}
/* Something from stackoverflow. */
.react-phone-number-input__country-select-divider
{
font-size : 1px;
background : black;
}
.react-phone-number-input__country-select:focus + .react-phone-number-input__country-select-arrow
{
color : #03B2CB;
}
/* Styling phone number input */
.react-phone-number-input__input
{
height : calc(0.3rem * 6);
outline : none;
border-radius : 0;
padding : 0;
appearance : none;
border : none;
border-bottom : 1px solid #C5D2E0;
transition : border 0.1s;
font-size : inherit;
}
.react-phone-number-input__input:focus
{
border-color : #03B2CB;
}
.react-phone-number-input__input--disabled
{
cursor : default;
}
.react-phone-number-input__input--invalid,
.react-phone-number-input__input--invalid:focus
{
border-color : #EB2010;
}
/* Overrides Chrome autofill yellow background color */
.react-phone-number-input__input:-webkit-autofill
{
box-shadow : 0 0 0 1000px white inset;
}
/* A small fix for `react-responsive-ui` */
.react-phone-number-input__country .rrui__select__button
{
border-bottom : none;
}