Skip to content

Commit

Permalink
fix on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
a-hariti committed Oct 30, 2024
1 parent 7e2ce3b commit 515df01
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/docPage/type.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,17 @@

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);
--scroll-margin-top: calc(var(--header-height) + 1.5rem + 2rem);
scroll-margin-top: var(--scroll-margin-top);
}

@media (max-width: 768px) {
.onboarding-options ~ :is(h1, h2, h3, h4, h5, h6) {
--scroll-margin-top: calc(var(--header-height) + 1.5rem + 5rem);
}
}

h1 {
Expand Down

0 comments on commit 515df01

Please sign in to comment.