Skip to content

Commit 7e2ce3b

Browse files
committed
fix: increase heading scroll margin under onboarding options
1 parent 97884d4 commit 7e2ce3b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/components/docPage/type.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141

4242
scroll-margin-top: calc(var(--header-height) + 1.5rem);
4343
}
44+
.onboarding-options ~ :is(h1, h2, h3, h4, h5, h6) {
45+
// the magic 2rem to account for the onboarding options
46+
scroll-margin-top: calc(var(--header-height) + 1.5rem + 2rem);
47+
}
4448

4549
h1 {
4650
font-size: 2rem;

src/components/onboarding/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export function OnboardingOptionButtons({
212212
}, [options, touchedOptions]);
213213

214214
return (
215-
<div className="flex flex-wrap gap-3 py-2 bg-[var(--white)] dark:bg-[var(--gray-1)] sticky top-[80px] z-[4] shadow-[var(--shadow-6)] transition">
215+
<div className="onboarding-options flex flex-wrap gap-3 py-2 bg-[var(--white)] dark:bg-[var(--gray-1)] sticky top-[80px] z-[4] shadow-[var(--shadow-6)] transition">
216216
{options.map(option => (
217217
<Button
218218
variant="surface"

0 commit comments

Comments
 (0)