10
10
height : 0 ;
11
11
border-left : 12px solid transparent;
12
12
border-right : 12px solid transparent;
13
- border-bottom : 12px solid var (--autocompleBackground );
13
+ border-bottom : 12px solid var (--autocompleteBackground );
14
14
position : absolute;
15
15
top : 8px ;
16
16
left : 26px ;
19
19
background-color : transparent;
20
20
}
21
21
22
+ .autocomplete-preview {
23
+ width : 100% ;
24
+ margin : 0 ;
25
+ height : 100% ;
26
+ line-height : 20px ;
27
+ background-color : var (--background );
28
+ font-family : var (--sansFontFamily );
29
+ border : 4px solid var (--autocompleteBorder );
30
+ padding : 12px 16px ;
31
+ }
32
+
33
+ .autocomplete-preview div , .autocomplete-preview span {
34
+ display : none;
35
+ }
36
+
37
+ .autocomplete-preview .loading div {
38
+ float : left;
39
+ display : block;
40
+ border : 5px solid var (--autocompleteBorder );
41
+ border-radius : 50% ;
42
+ border-top : 5px solid var (--textDetailAccent );
43
+ width : 20px ;
44
+ height : 20px ;
45
+ animation : spinner 4s linear infinite;
46
+ }
47
+
48
+ .autocomplete-preview .loading span {
49
+ color : var (--autocompleteResults );
50
+ display : inline;
51
+ margin-left : 6px ;
52
+ }
53
+
54
+ .autocomplete-preview .loading span : after {
55
+ color : var (--autocompleteResults );
56
+ content : "Loading" ;
57
+ }
58
+
59
+ @keyframes spinner {
60
+ 0% { transform : rotate (0deg ); }
61
+ 100% { transform : rotate (360deg ); }
62
+ }
63
+
64
+ .autocomplete-preview .loading iframe {
65
+ height : 0 ;
66
+ }
67
+
68
+ .autocomplete-preview iframe {
69
+ width : 100% ;
70
+ height : 100% ;
71
+ border : 0 ;
72
+ }
73
+
22
74
.autocomplete-results {
23
75
list-style : none;
24
76
margin : 0 ;
40
92
display : block;
41
93
}
42
94
43
- .autocomplete-suggestions {
44
- background-color : var (--autocompleBackground );
45
- border-radius : 8px ;
95
+ .autocomplete-container {
46
96
position : absolute;
47
97
top : 15px ;
48
98
width : 100% ;
49
99
z-index : 200 ;
100
+ }
101
+
102
+ .autocomplete-suggestions {
103
+ background-color : var (--autocompleteBackground );
104
+ border-radius : 8px ;
50
105
box-shadow : 0px 15px 99px 0px var (--autocompleteBorder );
51
106
overflow-y : auto;
52
107
max-height : 450px ;
53
108
white-space : normal;
54
109
overflow-x : hidden;
55
110
}
56
111
112
+ .autocomplete-suggestions .previewing : has (.selected ) {
113
+ max-height : 900px ;
114
+ }
115
+
116
+ .autocomplete-suggestions .previewing : has (.selected ) .autocomplete-suggestion : not (.selected ) {
117
+ display : none;
118
+ }
119
+
120
+ .autocomplete-suggestions .previewing : not (: has (.selected )) .autocomplete-preview {
121
+ display : none;
122
+ }
123
+
124
+ .autocomplete-suggestions : not (.previewing ) .autocomplete-preview {
125
+ display : none;
126
+ }
127
+
57
128
.autocomplete-suggestion {
58
129
color : inherit;
59
130
display : block;
60
131
padding : 12px 20px ;
61
132
text-decoration : none;
62
133
transition : background-color 0.3s ease-in-out;
63
- border-bottom : 1px solid var (--suggestionBorder );
134
+ border-top : 1px solid var (--suggestionBorder );
64
135
font-size : 0.9rem ;
65
136
}
66
137
67
- .autocomplete-suggestion : first-child {
68
- border-top : 1px solid var (--suggestionBorder );
138
+ .autocomplete-suggestion : hover ,
139
+ .autocomplete-suggestion .selected {
140
+ background-color : var (--autocompleteHover );
69
141
}
70
142
71
- .autocomplete-suggestion : last-child {
72
- border-bottom : 0 ;
143
+ .autocomplete-suggestion : not (. selected ) . autocomplete-preview-indicator {
144
+ display : none ;
73
145
}
74
146
75
- .autocomplete-suggestion : hover ,
76
- .autocomplete-suggestion .selected {
147
+ .autocomplete-preview-indicator {
148
+ float : right;
149
+ }
150
+
151
+ .autocomplete-preview-indicator button {
152
+ color : var (--iconAction );
153
+ display : flex;
154
+ align-items : center;
155
+ text-decoration : none;
156
+ border : 1px solid var (--suggestionBorder );
157
+ border-radius : 8px ;
158
+ transition : color .3s ease-in-out;
159
+ background-color : var (--autocompletePreview );
160
+ cursor : pointer;
161
+ padding : 4px 8px ;
162
+ font-size : 14px ;
163
+ }
164
+
165
+ .autocomplete-preview-indicator button : hover {
166
+ color : var (--iconActionHover );
77
167
background-color : var (--autocompleteHover );
78
168
}
79
169
170
+ .autocomplete-preview-indicator button i {
171
+ margin-right : 4px ;
172
+ }
173
+
174
+ .autocomplete-suggestions .previewing .autocomplete-preview-indicator-closed {
175
+ display : none;
176
+ }
177
+
178
+ .autocomplete-suggestions : not (.previewing ) .autocomplete-preview-indicator-open {
179
+ display : none;
180
+ }
181
+
182
+ .autocomplete-suggestion : hover : not (.selected ) .autocomplete-preview-indicator-closed {
183
+ display : block;
184
+ }
185
+
80
186
.autocomplete-suggestion em {
81
187
font-style : normal;
82
188
font-weight : bold;
117
223
118
224
/* Style the scrollbar track (the area behind the thumb) */
119
225
.autocomplete-suggestions ::-webkit-scrollbar {
120
- width : 5px ; /* Set the width of the scrollbar */
121
- border-radius : 7px ; /* Add rounded corners to the thumb */
226
+ width : 5px ;
227
+ /* Set the width of the scrollbar */
228
+ border-radius : 7px ;
229
+ /* Add rounded corners to the thumb */
122
230
flex-shrink : 0 ;
123
231
}
124
232
137
245
.autocomplete-results .press-return {
138
246
display : none;
139
247
}
140
- }
248
+ }
0 commit comments