Skip to content

Commit

Permalink
Backport PR jupyterlab#15703: Add scroll margin to headings for bette…
Browse files Browse the repository at this point in the history
…r alignment
  • Loading branch information
krassowski committed Jan 29, 2024
1 parent c00b0ca commit d4887f5
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 d4887f5

Please sign in to comment.