1010 height : 0 ;
1111 border-left : 12px solid transparent;
1212 border-right : 12px solid transparent;
13- border-bottom : 12px solid var (--autocompleBackground );
13+ border-bottom : 12px solid var (--autocompleteBackground );
1414 position : absolute;
1515 top : 8px ;
1616 left : 26px ;
1919 background-color : transparent;
2020}
2121
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+
2274.autocomplete-results {
2375 list-style : none;
2476 margin : 0 ;
4092 display : block;
4193}
4294
43- .autocomplete-suggestions {
44- background-color : var (--autocompleBackground );
45- border-radius : 8px ;
95+ .autocomplete-container {
4696 position : absolute;
4797 top : 15px ;
4898 width : 100% ;
4999 z-index : 200 ;
100+ }
101+
102+ .autocomplete-suggestions {
103+ background-color : var (--autocompleteBackground );
104+ border-radius : 8px ;
50105 box-shadow : 0px 15px 99px 0px var (--autocompleteBorder );
51106 overflow-y : auto;
52107 max-height : 450px ;
53108 white-space : normal;
54109 overflow-x : hidden;
55110}
56111
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+
57128.autocomplete-suggestion {
58129 color : inherit;
59130 display : block;
60131 padding : 12px 20px ;
61132 text-decoration : none;
62133 transition : background-color 0.3s ease-in-out;
63- border-bottom : 1px solid var (--suggestionBorder );
134+ border-top : 1px solid var (--suggestionBorder );
64135 font-size : 0.9rem ;
65136}
66137
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 );
69141}
70142
71- .autocomplete-suggestion : last-child {
72- border-bottom : 0 ;
143+ .autocomplete-suggestion : not (. selected ) . autocomplete-preview-indicator {
144+ display : none ;
73145}
74146
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 );
77167 background-color : var (--autocompleteHover );
78168}
79169
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+
80186.autocomplete-suggestion em {
81187 font-style : normal;
82188 font-weight : bold;
117223
118224/* Style the scrollbar track (the area behind the thumb) */
119225.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 */
122230 flex-shrink : 0 ;
123231}
124232
137245 .autocomplete-results .press-return {
138246 display : none;
139247 }
140- }
248+ }
0 commit comments