Skip to content

Commit 803454d

Browse files
committed
tweak styles
1 parent 3b88272 commit 803454d

File tree

6 files changed

+179
-160
lines changed

6 files changed

+179
-160
lines changed

apps/svelte.dev/src/routes/content.json/+server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ async function content() {
3131

3232
for (const document of docs) {
3333
const { slug, body, metadata } = document;
34+
const breadcrumbs = document.breadcrumbs.map((x) => x.title);
3435

3536
const sections = body.trim().split(/^## /m);
3637
const intro = sections?.shift()?.trim()!;

packages/site-kit/src/lib/actions/focus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function focusable_children(node: HTMLElement) {
22
const nodes: HTMLElement[] = Array.from(
33
node.querySelectorAll(
4-
'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
4+
'a[href], button, input, textarea, select, [tabindex]:not([tabindex="-1"])'
55
)
66
);
77

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

Lines changed: 13 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ It appears when the user clicks on the `Search` component or presses the corresp
217217
{#each recent_searches as search}
218218
<li class="recent">
219219
<a onclick={() => navigate(search.href)} href={search.href}>
220-
<small>{search.breadcrumbs.join('/')}</small>
221-
<strong>{search.breadcrumbs.at(-1)}</strong>
220+
{search.breadcrumbs.at(-1)}
222221
</a>
223222

224223
<button
@@ -265,10 +264,10 @@ It appears when the user clicks on the `Search` component or presses the corresp
265264
}
266265
267266
input {
268-
font-size: 1.6rem;
267+
font-size: var(--sk-text-l);
269268
width: 100%;
270269
padding: 1rem 6rem 0.5rem 1rem;
271-
height: 5rem;
270+
height: 6rem;
272271
border: none;
273272
border-bottom: 1px solid var(--sk-back-3);
274273
flex-shrink: 0;
@@ -296,7 +295,7 @@ It appears when the user clicks on the `Search` component or presses the corresp
296295
top: 0;
297296
right: 0;
298297
width: 5rem;
299-
height: 5rem;
298+
height: 6rem;
300299
background: none;
301300
border-radius: var(--sk-border-radius);
302301
color: var(--sk-text-2);
@@ -329,13 +328,14 @@ It appears when the user clicks on the `Search` component or presses the corresp
329328
position: relative;
330329
height: calc(100% - 2rem);
331330
width: calc(100vw - 2rem);
332-
max-width: 50rem;
333-
max-height: 50rem;
331+
max-width: 64rem;
332+
max-height: 64rem;
334333
filter: drop-shadow(2px 4px 16px rgba(0, 0, 0, 0.2));
335334
border-radius: var(--sk-border-radius);
336335
display: flex;
337336
flex-direction: column;
338337
overflow: hidden;
338+
font-family: var(--sk-font-ui);
339339
340340
& > * {
341341
pointer-events: all;
@@ -368,57 +368,19 @@ It appears when the user clicks on the `Search` component or presses the corresp
368368
}
369369
370370
a {
371+
color: var(--sk-text-2);
371372
display: block;
372373
text-decoration: none;
373374
line-height: 1;
374-
padding: 1rem;
375+
padding: 1rem 5rem 1rem 1rem;
375376
376377
&:hover {
377378
background: rgba(0, 0, 0, 0.05);
378379
}
379380
380381
&:focus {
381-
background: var(--sk-theme-2);
382-
color: var(--sk-back-1);
383-
outline: none;
384-
}
385-
386-
& small,
387-
& strong {
388-
display: block;
389-
white-space: nowrap;
390-
overflow: hidden;
391-
text-overflow: ellipsis;
392-
line-height: 1;
393-
}
394-
395-
& small {
396-
font-size: 1rem;
397-
text-transform: uppercase;
398-
font-weight: 600;
399-
color: var(--sk-text-3);
400-
}
401-
402-
& strong {
403-
font-size: 1.6rem;
404-
color: var(--sk-text-2);
405-
margin: 0.4rem 0;
406-
}
407-
408-
&:focus small {
409-
color: white;
410-
opacity: 0.6;
411-
}
412-
413-
&:focus strong {
414-
color: white;
415-
}
416-
417-
& strong :global(mark) {
418-
background: var(--sk-theme-2);
419-
color: var(--sk-text-3);
420-
text-decoration: none;
421-
border-radius: 1px;
382+
border-radius: var(--sk-border-radius);
383+
outline-offset: -3px;
422384
}
423385
}
424386
@@ -441,14 +403,9 @@ It appears when the user clicks on the `Search` component or presses the corresp
441403
}
442404
443405
&:focus-visible {
444-
background: var(--sk-theme-2);
445-
color: var(--sk-text-1);
446406
opacity: 1;
447-
outline: none;
448-
}
449-
450-
a:focus + & {
451-
color: var(--sk-back-1);
407+
border-radius: var(--sk-border-radius);
408+
outline-offset: -3px;
452409
}
453410
}
454411
</style>

0 commit comments

Comments
 (0)