Skip to content

Commit f0741c2

Browse files
committed
more
1 parent 5f832dc commit f0741c2

File tree

3 files changed

+46
-39
lines changed

3 files changed

+46
-39
lines changed

packages/site-kit/src/lib/search/SearchBox.svelte

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,46 @@ It appears when the user clicks on the `Search` component or presses the corresp
263263
z-index: 100;
264264
}
265265
266+
.modal {
267+
position: fixed;
268+
display: flex;
269+
justify-content: center;
270+
align-items: center;
271+
pointer-events: none;
272+
left: 0;
273+
top: 0;
274+
width: 100%;
275+
height: 100%;
276+
z-index: 9999;
277+
}
278+
279+
.search-box {
280+
--padding: 1rem;
281+
position: relative;
282+
height: calc(100% - 2rem);
283+
width: calc(100vw - 2rem);
284+
max-width: 64rem;
285+
max-height: 64rem;
286+
filter: drop-shadow(2px 4px 16px rgba(0, 0, 0, 0.2));
287+
border-radius: var(--sk-border-radius);
288+
display: flex;
289+
flex-direction: column;
290+
overflow: hidden;
291+
font-family: var(--sk-font-ui);
292+
293+
@media (min-width: 800px) {
294+
--padding: 1.6rem;
295+
}
296+
297+
& > * {
298+
pointer-events: all;
299+
}
300+
}
301+
266302
input {
267303
font-size: var(--sk-text-l);
268304
width: 100%;
269-
padding: 1rem 5rem 0.5rem 1rem;
305+
padding: var(--padding) 5rem var(--padding) var(--padding);
270306
height: 6rem;
271307
border: none;
272308
border-bottom: 1px solid var(--sk-back-3);
@@ -315,37 +351,6 @@ It appears when the user clicks on the `Search` component or presses the corresp
315351
margin: 0;
316352
}
317353
318-
.modal {
319-
position: fixed;
320-
display: flex;
321-
justify-content: center;
322-
align-items: center;
323-
pointer-events: none;
324-
left: 0;
325-
top: 0;
326-
width: 100%;
327-
height: 100%;
328-
z-index: 9999;
329-
}
330-
331-
.search-box {
332-
position: relative;
333-
height: calc(100% - 2rem);
334-
width: calc(100vw - 2rem);
335-
max-width: 64rem;
336-
max-height: 64rem;
337-
filter: drop-shadow(2px 4px 16px rgba(0, 0, 0, 0.2));
338-
border-radius: var(--sk-border-radius);
339-
display: flex;
340-
flex-direction: column;
341-
overflow: hidden;
342-
font-family: var(--sk-font-ui);
343-
344-
& > * {
345-
pointer-events: all;
346-
}
347-
}
348-
349354
.results {
350355
overflow: auto;
351356
overscroll-behavior-y: none;
@@ -358,7 +363,7 @@ It appears when the user clicks on the `Search` component or presses the corresp
358363
}
359364
360365
.info {
361-
padding: 1rem;
366+
padding: var(--padding);
362367
font-family: var(--sk-font-ui);
363368
font-size: 1.2rem;
364369
font-weight: normal;
@@ -376,7 +381,7 @@ It appears when the user clicks on the `Search` component or presses the corresp
376381
display: block;
377382
text-decoration: none;
378383
line-height: 1;
379-
padding: 1rem 5rem 1rem 1rem;
384+
padding: 1rem calc(4rem + var(--padding)) 1rem var(--padding);
380385
381386
&:hover {
382387
background: rgba(0, 0, 0, 0.05);

packages/site-kit/src/lib/search/SearchResultList.svelte

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@
7070
}
7171
7272
details {
73+
padding: 0.5rem 0;
74+
7375
summary {
7476
position: sticky;
7577
top: 0;
7678
display: block;
7779
background: var(--sk-back-2);
7880
color: var(--sk-text-4);
7981
text-transform: uppercase;
80-
padding: 1rem 1rem 0.5rem 1rem;
82+
padding: 0.5rem var(--padding);
8183
font-size: var(--sk-text-xs);
8284
z-index: 2;
8385
user-select: none;
@@ -110,7 +112,7 @@
110112
display: block;
111113
text-decoration: none;
112114
line-height: 1;
113-
padding: 1rem 1rem 1rem 5rem;
115+
padding: 1.2rem var(--padding) 1.2rem calc(4rem + var(--padding));
114116
overflow: hidden;
115117
background: var(--background);
116118
@@ -170,8 +172,8 @@
170172
171173
.excerpt {
172174
position: relative;
173-
width: calc(100% + 1.4rem);
174-
left: -0.7rem;
175+
width: calc(100% + 1rem);
176+
left: -0.5rem;
175177
overflow: hidden;
176178
color: var(--sk-text-1);
177179

packages/site-kit/src/lib/search/SearchResults.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Renders a list of search results
3030

3131
<style>
3232
.info {
33-
padding: 1rem;
33+
padding: var(--padding);
3434
font-size: 1.2rem;
3535
font-weight: normal;
3636
text-transform: uppercase;

0 commit comments

Comments
 (0)