Skip to content

Commit 972fa5c

Browse files
committed
format
1 parent 4eeac8e commit 972fa5c

File tree

3 files changed

+34
-33
lines changed

3 files changed

+34
-33
lines changed

packages/site-kit/src/lib/nav/MobileMenu.svelte

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -66,41 +66,41 @@
6666
class="clip"
6767
style:--height-difference="{menu_height - universal_menu_inner_height}px"
6868
ontransitionstart={(e) => {
69-
const target = e.target as HTMLElement;
69+
const target = e.target as HTMLElement;
7070

71-
if (!target?.classList.contains('viewport')) return;
72-
if (e.propertyName !== 'transform') return;
71+
if (!target?.classList.contains('viewport')) return;
72+
if (e.propertyName !== 'transform') return;
7373

74-
// we need to apply a clip-path during the transition so that the contents
75-
// are constrained to the menu background, but only while the transition
76-
// is running, otherwise it prevents the contents from being scrolled
77-
const a = 'calc(var(--height-difference) + 1px)';
78-
const b = '1px';
74+
// we need to apply a clip-path during the transition so that the contents
75+
// are constrained to the menu background, but only while the transition
76+
// is running, otherwise it prevents the contents from being scrolled
77+
const a = 'calc(var(--height-difference) + 1px)';
78+
const b = '1px';
7979

80-
const start = show_context_menu ? a : b;
81-
const end = show_context_menu ? b : a;
80+
const start = show_context_menu ? a : b;
81+
const end = show_context_menu ? b : a;
8282

83-
const container = e.currentTarget;
83+
const container = e.currentTarget;
8484

85-
container.style.clipPath = `polygon(0% ${start}, 100% ${start}, 100% 100%, 0% 100%)`;
85+
container.style.clipPath = `polygon(0% ${start}, 100% ${start}, 100% 100%, 0% 100%)`;
8686

87-
setTimeout(() => {
88-
container.style.clipPath = `polygon(0% ${end}, 100% ${end}, 100% 100%, 0% 100%)`;
89-
}, 0);
90-
}}
87+
setTimeout(() => {
88+
container.style.clipPath = `polygon(0% ${end}, 100% ${end}, 100% 100%, 0% 100%)`;
89+
}, 0);
90+
}}
9191
ontransitionend={(e) => {
92-
const target = e.target as HTMLElement;
92+
const target = e.target as HTMLElement;
9393

94-
if (!target?.classList.contains('viewport')) return;
95-
if (e.propertyName !== 'transform') return;
94+
if (!target?.classList.contains('viewport')) return;
95+
if (e.propertyName !== 'transform') return;
9696

97-
e.currentTarget.style.clipPath = '';
97+
e.currentTarget.style.clipPath = '';
9898

99-
// whenever we transition from one menu to the other, we need to move focus to the first item in the new menu
100-
if (!show_context_menu) {
101-
universal_menu?.querySelector('a')?.focus();
102-
}
103-
}}
99+
// whenever we transition from one menu to the other, we need to move focus to the first item in the new menu
100+
if (!show_context_menu) {
101+
universal_menu?.querySelector('a')?.focus();
102+
}
103+
}}
104104
>
105105
<div
106106
class="viewport"

packages/site-kit/src/lib/nav/Nav.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ Top navigation bar for the application. It provides a slot for the left side, th
9898
<a
9999
class="secondary"
100100
href={section.path}
101-
aria-current={$page.url.pathname === section.path || $page.url.pathname.startsWith(section.path!)
102-
? 'page'
103-
: undefined}
101+
aria-current={$page.url.pathname === section.path ||
102+
$page.url.pathname.startsWith(section.path!)
103+
? 'page'
104+
: undefined}
104105
>
105106
{section.title}
106107
</a>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ It appears when the user clicks on the `Search` component or presses the corresp
172172
<input
173173
use:forcefocus
174174
onkeydown={(e) => {
175-
if (e.key === 'Enter' && !e.isComposing) {
176-
const element = modal.querySelector('a[data-has-node]') as HTMLElement | undefined;
177-
element?.click();
178-
}
179-
}}
175+
if (e.key === 'Enter' && !e.isComposing) {
176+
const element = modal.querySelector('a[data-has-node]') as HTMLElement | undefined;
177+
element?.click();
178+
}
179+
}}
180180
oninput={(e) => {
181181
$search_query = e.currentTarget.value;
182182
}}

0 commit comments

Comments
 (0)