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 (#38220)
  • Loading branch information
louismaximepiton committed Mar 20, 2023
1 parent 5d40483 commit a6d8aa8
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 a6d8aa8

Please sign in to comment.