Skip to content

Commit

Permalink
doc: apply scroll-margin-top to h2, h3 elements
Browse files Browse the repository at this point in the history
PR-URL: #44414
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
metonym authored Aug 30, 2022
1 parent 01c7a98 commit 8f5dee0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions doc/api_assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,13 @@
--color-text-secondary: var(--green2);
}

h2 :target,
h3 :target,
h4 :target,
h5 :target {
scroll-margin-top: 55px;
}

@supports not (content-visibility: auto) {
h3 :target {
scroll-margin-top: 55px;
}
}

.dark-mode {
--background-color-highlight: var(--black2);
--color-critical: var(--red4);
Expand Down

1 comment on commit 8f5dee0

@EloB
Copy link

@EloB EloB commented on 8f5dee0 Sep 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to fix https://nodejs.org/api/crypto.html#crypto? I've just noticed this issue on official docs...

Current behavior (on Chrome for me):
image

Expected behavior:
image

This might not be related but it would be nice if it worked.

Please sign in to comment.