0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-24 03:07:54 +01:00
nodejs/doc/api_assets
Antoine du Hamel 528fef2285
doc: improve fragment (:target) anchors behavior on HTML version
This commit aims to improve the UX when navigating the docs using links
to subsections. Previously the browser would scroll down to the section
body, skipping the section heading. Using `scroll-margin-top` CSS
property, we can fix this behavior (at least on some browsers).

Links to other versions are now updated with the current targeted hash
to improve the UX when navigating from docs of one release line to
another.

I've also removed syntax not parsable by older browsers (arrow functions
and array destructuring) since the diff is pretty small and should
improve UX on those browsers.

PR-URL: https://github.com/nodejs/node/pull/42739
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-17 15:51:42 +01:00
..
api.js doc: improve fragment (:target) anchors behavior on HTML version 2022-04-17 15:51:42 +01:00
hljs.css tools: upgrade highlight.js to version 11.0.1 2021-06-26 15:13:35 +00:00
js-flavor-cjs.svg doc: replace text with paths in toggle SVGs 2022-02-10 20:00:24 +00:00
js-flavor-esm.svg doc: replace text with paths in toggle SVGs 2022-02-10 20:00:24 +00:00
README.md doc: make header smaller and dropdown click-driven when JS is on 2022-03-22 21:31:56 +00:00
style.css doc: improve fragment (:target) anchors behavior on HTML version 2022-04-17 15:51:42 +01:00

API Reference Document Assets

api.js

The main script for API reference documents.

hljs.css

The syntax theme for code snippets in API reference documents.

style.css

The main stylesheet for API reference documents.