Skip to content

Commit a83d3a5

Browse files
thejacksheltonGregOnNet
authored andcommitted
docs(docs): fixing the header, making it sticky so there is no layout shift
1 parent 426bf48 commit a83d3a5

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

apps/website/src/routes/_components/header/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default component$(
6464
return (
6565
<header
6666
class={[
67-
`fixed top-0 z-20 flex h-20 w-full items-center gap-8 border-b-[1px] border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-900 md:h-20`,
67+
`sticky top-0 z-20 flex h-20 w-full items-center gap-8 border-b-[1px] border-slate-200 bg-white p-4 dark:border-slate-800 dark:bg-slate-900 md:h-20`,
6868
`shadow-light-low dark:shadow-dark-medium`,
6969
rootStore.isSidebarOpened
7070
? 'bg-blue-200 brightness-75 dark:bg-indigo-900'

apps/website/src/routes/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default component$(() => {
2727
<>
2828
<Header showBottomBorder={true} showVersion={true} />
2929
<QwikUIProvider>
30-
<div class="setup-grid-areas lg:grid-cols-custom-lg 2xl:grid-cols-custom-2xl mt-20 grid">
30+
<div class="setup-grid-areas lg:grid-cols-custom-lg 2xl:grid-cols-custom-2xl grid">
3131
<DocsNavigation linksGroups={menuItemsGroups} />
3232
<main class="docs [grid-area:main]">
3333
<Slot />

packages/kit-headless/src/components/modal/modal-behavior.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ export function activateFocusTrap(focusTrap: FocusTrap | null) {
2525
}
2626
}
2727

28-
/**
29-
* Deactivates the given FocusTrap
30-
*/
3128
export function deactivateFocusTrap(focusTrap: FocusTrap | null) {
3229
focusTrap?.deactivate();
3330
focusTrap = null;
@@ -84,14 +81,14 @@ export function overrideNativeDialogEscapeBehaviorWith(continuation: () => void)
8481
};
8582
}
8683

87-
/*
84+
/**
8885
* Adds CSS-Class to support modal-opening-animation
8986
*/
9087
export function supportShowAnimation(modal: HTMLDialogElement) {
9188
modal.classList.add('modal-showing');
9289
}
9390

94-
/*
91+
/**
9592
* Listens for animation/transition events in order to
9693
* remove Animation-CSS-Classes after animation/transition ended.
9794
*/
@@ -105,14 +102,14 @@ export function supportClosingAnimation(
105102
const { animationDuration, transitionDuration } = getComputedStyle(modal);
106103

107104
const runAnimationEnd = () => {
108-
clearAllBodyScrollLocks();
109105
modal.classList.remove('modal-closing');
106+
clearAllBodyScrollLocks();
110107
afterAnimate();
111108
};
112109

113110
const runTransitionEnd = () => {
114-
clearAllBodyScrollLocks();
115111
modal.classList.remove('modal-closing');
112+
clearAllBodyScrollLocks();
116113
afterAnimate();
117114
};
118115

0 commit comments

Comments
 (0)