Skip to content

Commit

Permalink
Add scroll-margin-top to headings
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Jan 26, 2024
1 parent cd268ce commit 37059ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/rendermime/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@
font-style: normal;
margin: var(--jp-content-heading-margin-top) 0
var(--jp-content-heading-margin-bottom) 0;
scroll-margin-top: var(--jp-content-heading-margin-top);
}

.jp-RenderedHTMLCommon h1:first-child,
Expand All @@ -292,6 +293,7 @@
.jp-RenderedHTMLCommon h5:first-child,
.jp-RenderedHTMLCommon h6:first-child {
margin-top: calc(0.5 * var(--jp-content-heading-margin-top));
scroll-margin-top: calc(0.5 * var(--jp-content-heading-margin-top));
}

.jp-RenderedHTMLCommon h1:last-child,
Expand Down

0 comments on commit 37059ba

Please sign in to comment.