Skip to content

Commit 515df01

Browse files
committed
fix on mobile
1 parent 7e2ce3b commit 515df01

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/docPage/type.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,17 @@
4141

4242
scroll-margin-top: calc(var(--header-height) + 1.5rem);
4343
}
44+
4445
.onboarding-options ~ :is(h1, h2, h3, h4, h5, h6) {
4546
// the magic 2rem to account for the onboarding options
46-
scroll-margin-top: calc(var(--header-height) + 1.5rem + 2rem);
47+
--scroll-margin-top: calc(var(--header-height) + 1.5rem + 2rem);
48+
scroll-margin-top: var(--scroll-margin-top);
49+
}
50+
51+
@media (max-width: 768px) {
52+
.onboarding-options ~ :is(h1, h2, h3, h4, h5, h6) {
53+
--scroll-margin-top: calc(var(--header-height) + 1.5rem + 5rem);
54+
}
4755
}
4856

4957
h1 {

0 commit comments

Comments
 (0)