Skip to content

Commit b5bbbf6

Browse files
committed
cover more anchor element cases for scroll offset
1 parent 9cfd4f0 commit b5bbbf6

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

styles/global.scss

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ section,
206206
border-bottom-width: 1px;
207207
border-color: var(--type-color);
208208
padding-bottom: var(--gutter-lg);
209+
margin-top: var(--gutter-sm);
209210

210211
&:last-child {
211212
border-width: 0px;
212213
}
213214

214215
h2,
215216
.text-h2 {
216-
padding-top: var(--gutter-sm);
217217
margin-top: 0px;
218218
margin-bottom: var(--gutter-md);
219219
}
@@ -222,9 +222,12 @@ section,
222222
.text-h2,
223223
h3,
224224
text-h3 {
225-
scroll-margin-top: var(--gutter-md);
226-
@media (min-width: $breakpoint-tablet) {
227-
scroll-margin-top: 0;
225+
&,
226+
& > * {
227+
scroll-margin-top: var(--gutter-md);
228+
@media (min-width: $breakpoint-tablet) {
229+
scroll-margin-top: var(--gutter-sm);
230+
}
228231
}
229232
}
230233
}

0 commit comments

Comments
 (0)