Skip to content

Commit

Permalink
Add scroll margin to headings for better alignment (#15703)
Browse files Browse the repository at this point in the history
* Add scroll-margin-top to headings

* Update Playwright Snapshots

* Update two snapshots to reflect new ui-tookit version

which solved a problem with background of disabled buttons

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
krassowski and github-actions[bot] committed Jan 29, 2024
1 parent 558c60f commit 728c2b3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 0 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 728c2b3

Please sign in to comment.