@@ -160,24 +160,26 @@ It appears when the user clicks on the `Search` component or presses the corresp
160
160
use:trap
161
161
>
162
162
<div class =" search-box" >
163
- <!-- svelte-ignore a11y_autofocus -->
164
- <input
165
- autofocus
166
- onkeydown ={(e ) => {
163
+ <div style =" background: var(--background)" >
164
+ <!-- svelte-ignore a11y_autofocus -->
165
+ <input
166
+ autofocus
167
+ onkeydown ={(e ) => {
167
168
if (e .key === ' Enter' && ! e .isComposing ) {
168
169
const element = modal .querySelector (' a[data-has-node]' ) as HTMLElement | undefined ;
169
170
element ?.click ();
170
171
}
171
172
}}
172
- oninput ={(e ) => {
173
- $search_query = e .currentTarget .value ;
174
- }}
175
- value ={$search_query }
176
- {placeholder }
177
- aria-describedby =" search-description"
178
- aria-label ={placeholder }
179
- spellcheck =" false"
180
- />
173
+ oninput ={(e ) => {
174
+ $search_query = e .currentTarget .value ;
175
+ }}
176
+ value ={$search_query }
177
+ {placeholder }
178
+ aria-describedby =" search-description"
179
+ aria-label ={placeholder }
180
+ spellcheck =" false"
181
+ />
182
+ </div >
181
183
182
184
<button aria-label ="Close" onclick ={close }>
183
185
<!-- <Icon name="close" /> -->
@@ -204,18 +206,19 @@ It appears when the user clicks on the `Search` component or presses the corresp
204
206
/>
205
207
</div >
206
208
{:else }
207
- <h2 class ="info" class:empty ={recent_searches .length === 0 }>
209
+ <span class ="info" class:empty ={recent_searches .length === 0 }>
208
210
{#if idle }
209
211
{@render idle (recent_searches .length )}
210
212
{:else }
211
213
{recent_searches .length ? ' Recent searches' : ' No recent searches' }
212
214
{/if }
213
- </h2 >
215
+ </span >
216
+
214
217
{#if recent_searches .length }
215
218
<div class =" results-container" >
216
- <ul >
219
+ <ul class = " recent " >
217
220
{#each recent_searches as search }
218
- <li class = " recent " >
221
+ <li >
219
222
<a onclick ={() => navigate (search .href )} href ={search .href }>
220
223
{search .breadcrumbs .at (- 1 )}
221
224
</a >
@@ -279,7 +282,7 @@ It appears when the user clicks on the `Search` component or presses the corresp
279
282
.search-box {
280
283
--padding : 1rem ;
281
284
--background : var (--sk-back-2 );
282
- background : var (--background );
285
+ /* background: var(--background); */
283
286
position : relative ;
284
287
height : calc (100% - 2rem );
285
288
width : calc (100vw - 2rem );
@@ -360,59 +363,67 @@ It appears when the user clicks on the `Search` component or presses the corresp
360
363
.results-container {
361
364
border-radius : 0 0 var (--sk-border-radius ) var (--sk-border-radius );
362
365
pointer-events : all ;
366
+ background : var (--background );
367
+
368
+ li {
369
+ position : relative ;
370
+
371
+ a {
372
+ color : var (--sk-text-2 );
373
+ display : block ;
374
+ text-decoration : none ;
375
+ padding : 0.5rem calc (4rem + var (--padding )) 0.5rem var (--padding );
376
+
377
+ &:hover {
378
+ background : rgba (0 , 0 , 0 , 0.05 );
379
+ }
380
+
381
+ &:focus {
382
+ outline-offset : -3px ;
383
+ }
384
+ }
385
+
386
+ button [aria-label = ' Delete' ] {
387
+ position : absolute ;
388
+ top : 0 ;
389
+ right : 0 ;
390
+ width : 5rem ;
391
+ height : 100% ;
392
+ color : var (--sk-text-2 );
393
+ opacity : 0.1 ;
394
+
395
+ &:hover {
396
+ opacity: 1 ;
397
+ outline : none ;
398
+ }
399
+
400
+ &:focus-visible {
401
+ opacity : 1 ;
402
+ outline-offset : -3px ;
403
+ }
404
+ }
405
+ }
406
+
407
+ .recent {
408
+ a {
409
+ font-size : var (--sk-font-size-ui-medium );
410
+ }
411
+ }
363
412
}
364
413
365
414
.info {
415
+ display : block ;
416
+ background : var (--background );
366
417
padding : var (--padding );
367
418
font-family : var (--sk-font-ui );
368
419
font-size : var (--sk-font-size-ui-medium );
369
420
color : var (--sk-text-4 );
370
421
font-weight : normal ;
371
422
text-transform : uppercase ;
372
423
pointer-events : all ;
373
- }
374
-
375
- .info.empty {
376
- border-radius : 0 0 var (--sk-border-radius ) var (--sk-border-radius );
377
- }
378
-
379
- a {
380
- color : var (--sk-text-2 );
381
- display : block ;
382
- text-decoration : none ;
383
- line-height : 1 ;
384
- padding : 1rem calc (4rem + var (--padding )) 1rem var (--padding );
385
-
386
- &:hover {
387
- background : rgba (0 , 0 , 0 , 0.05 );
388
- }
389
-
390
- &:focus {
391
- outline-offset : -3px ;
392
- }
393
- }
394
-
395
- li {
396
- position : relative ;
397
- }
398
424
399
- button [aria-label = ' Delete' ] {
400
- position : absolute ;
401
- top : 0 ;
402
- right : 0 ;
403
- width : 5rem ;
404
- height : 100% ;
405
- color : var (--sk-text-2 );
406
- opacity : 0.1 ;
407
-
408
- &:hover {
409
- opacity: 1 ;
410
- outline : none ;
411
- }
412
-
413
- &:focus-visible {
414
- opacity : 1 ;
415
- outline-offset : -3px ;
425
+ &.empty {
426
+ border-radius : 0 0 var (--sk-border-radius ) var (--sk-border-radius );
416
427
}
417
428
}
418
429
</style >
0 commit comments