-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathautocomplete.css
167 lines (141 loc) · 3.12 KB
/
autocomplete.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
.autocomplete__wrapper {
position: relative;
}
.autocomplete__hint,
.autocomplete__input {
appearance: none;
border: 2px solid #0b0c0c;
border-radius: 0; /* Safari 10 on iOS adds implicit border rounding. */
box-sizing: border-box;
margin-bottom: 0; /* BUG: Safari 10 on macOS seems to add an implicit margin. */
line-height: 1.25;
height: 2.5rem;
width: 100%;
}
.autocomplete__input {
background-color: transparent;
position: relative;
}
.autocomplete__hint {
color: #505a5f;
position: absolute;
}
.autocomplete__input--default {
padding: 5px;
}
.autocomplete__input--focused {
outline: 3px solid #fd0;
outline-offset: 0;
box-shadow: inset 0 0 0 2px;
}
.autocomplete__input--show-all-values {
padding: 5px 35px 5px 5px; /* Space for arrow. Other padding should match .autocomplete__input--default. */
cursor: pointer;
}
.autocomplete__dropdown-arrow-down {
z-index: -1;
display: inline-block;
position: absolute;
right: 8px;
width: 24px;
height: 24px;
top: 10px;
}
.autocomplete__menu {
background-color: #ffffff;
border: 2px solid #0b0c0c;
border-top: 0;
color: #0b0c0c;
margin: 0;
max-height: 342px;
overflow-x: hidden;
padding: 0;
width: 100%;
width: calc(100% - 4px);
}
.autocomplete__menu--visible {
display: block;
}
.autocomplete__menu--hidden {
display: none;
}
.autocomplete__menu--overlay {
box-shadow: rgba(0, 0, 0, 0.256863) 0px 2px 6px;
left: 0;
position: absolute;
top: 100%;
z-index: 100;
}
.autocomplete__menu--inline {
position: relative;
}
.autocomplete__option {
border-bottom: solid #b1b4b6;
border-width: 1px 0;
cursor: pointer;
display: block;
position: relative;
}
.autocomplete__option > * {
pointer-events: none;
}
.autocomplete__option:first-of-type {
border-top-width: 0;
}
.autocomplete__option:last-of-type {
border-bottom-width: 0;
}
.autocomplete__option--odd {
background-color: #f3f2f1;
}
.autocomplete__option--focused,
.autocomplete__option:hover {
background-color: #1d70b8;
border-color: #1d70b8;
color: white;
outline: none;
}
@media (-ms-high-contrast: active), (forced-colors: active) {
.autocomplete__menu {
border-color: FieldText;
}
.autocomplete__option {
background-color: Field;
color: FieldText;
}
.autocomplete__option--focused,
.autocomplete__option:hover {
forced-color-adjust: none; /* prevent backplate from obscuring text */
background-color: Highlight;
border-color: Highlight;
color: HighlightText;
/* Prefer SelectedItem / SelectedItemText in browsers that support it */
background-color: SelectedItem;
border-color: SelectedItem;
color: SelectedItemText;
outline-color: SelectedItemText;
}
}
.autocomplete__option--no-results {
background-color: #f3f2f1;
color: #505a5f;
cursor: not-allowed;
}
.autocomplete__hint,
.autocomplete__input,
.autocomplete__option {
font-size: 1rem;
font-weight: 400;
}
.autocomplete__hint,
.autocomplete__option {
padding: 5px;
}
@media (min-width: 641px) {
.autocomplete__hint,
.autocomplete__input,
.autocomplete__option {
font-size: 1.1875rem;
line-height: 1.3157894737;
}
}