Skip to content

Commit

Permalink
fix: increase heading scroll margin under onboarding options
Browse files Browse the repository at this point in the history
  • Loading branch information
a-hariti committed Oct 9, 2024
1 parent 97884d4 commit 7e2ce3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/components/docPage/type.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@

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

h1 {
font-size: 2rem;
Expand Down
2 changes: 1 addition & 1 deletion src/components/onboarding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export function OnboardingOptionButtons({
}, [options, touchedOptions]);

return (
<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">
<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">
{options.map(option => (
<Button
variant="surface"
Expand Down

0 comments on commit 7e2ce3b

Please sign in to comment.