Skip to content

Commit

Permalink
Proposal to use scroll-margin-top instead of introducing padding an…
Browse files Browse the repository at this point in the history
…d negative margin
  • Loading branch information
louismaximepiton committed Mar 13, 2023
1 parent e9355c6 commit c7502f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 0 additions & 5 deletions site/assets/scss/_content.scss
Expand Up @@ -4,11 +4,6 @@

.bd-content {
// Offset content from fixed navbar when jumping to headings
> :target {
padding-top: 5rem;
margin-top: -5rem;
}

> h2,
> h3,
> h4 {
Expand Down
5 changes: 4 additions & 1 deletion site/assets/scss/_scrolling.scss
Expand Up @@ -3,8 +3,11 @@
main {
a,
button,
h2,
h3,
h4,
[tabindex="0"] {
scroll-margin-top: 100px;
scroll-margin-top: 80px;
scroll-margin-bottom: 100px;
}
}

0 comments on commit c7502f2

Please sign in to comment.