File tree Expand file tree Collapse file tree 1 file changed +27
-27
lines changed
sites/kit.svelte.dev/src/lib/search Expand file tree Collapse file tree 1 file changed +27
-27
lines changed Original file line number Diff line number Diff line change 189189 {/if }
190190 {:else }
191191 <h2 class ="info" >{recent_searches .length ? ' Recent searches' : ' No recent searches' }</h2 >
192- <ul >
193- {#each recent_searches as search , i }
194- <!-- svelte-ignore a11y-mouse-events-have-key-events -->
195- <li class =" recent" >
196- <a on:click ={() => navigate (search .href )} href ={search .href }>
197- <small >{search .breadcrumbs .join (' /' )}</small >
198- <strong >{search .title }</strong >
199- </a >
200-
201- <button
202- aria-label =" Delete"
203- on:click ={(e ) => {
204- $recent = $recent .filter ((href ) => href !== search .href );
205- e .stopPropagation ();
206- e .preventDefault ();
207- }}
208- >
209- <Icon name =" delete" />
210- </button >
211- </li >
212- {/each }
213- </ul >
192+ {#if recent_searches .length }
193+ <ul >
194+ {#each recent_searches as search , i }
195+ <!-- svelte-ignore a11y-mouse-events-have-key-events -->
196+ <li class =" recent" >
197+ <a on:click ={() => navigate (search .href )} href ={search .href }>
198+ <small >{search .breadcrumbs .join (' /' )}</small >
199+ <strong >{search .title }</strong >
200+ </a >
201+
202+ <button
203+ aria-label =" Delete"
204+ on:click ={(e ) => {
205+ $recent = $recent .filter ((href ) => href !== search .href );
206+ e .stopPropagation ();
207+ e .preventDefault ();
208+ }}
209+ >
210+ <Icon name =" delete" />
211+ </button >
212+ </li >
213+ {/each }
214+ </ul >
215+ {/if }
214216 {/if }
215217 </div >
216218 </div >
233235 border : none ;
234236 border-bottom : 1px solid #eee ;
235237 font-weight : 600 ;
238+ flex-shrink : 0 ;
236239 }
237240
238241 input ::selection {
286289
287290 .modal {
288291 display : flex ;
289- align-items : center ;
290292 justify-content : center ;
293+ align-items : center ;
291294 pointer-events : none ;
292295 }
293296
294297 .search-box {
295298 position : relative ;
296- width : calc (100vw - 2rem );
297299 height : calc (100% - 2rem );
300+ width : calc (100vw - 2rem );
298301 max-width : 50rem ;
299302 max-height : 50rem ;
300303 filter : drop-shadow (2px 4px 16px rgba (0 , 0 , 0 , 0.2 ));
301304 border-radius : var (--border-r );
302305 display : flex ;
303306 flex-direction : column ;
304307 overflow : hidden ;
305- pointer-events : none ;
306308 }
307309
308310 .search-box > * {
309311 pointer-events : all ;
310312 }
311313
312314 .results {
313- flex : 1 ;
314315 overflow : auto ;
315316 overscroll-behavior-y : none ;
316- pointer-events : none ;
317317 }
318318
319319 ul {
You can’t perform that action at this time.
0 commit comments