Skip to content

doc: apply scroll-margin-top to h2, h3 elements

#42739 added a scroll-margin-top rule to h4, h5 headings so they wouldn't be obscured by the fixed header.

However, other heading elements (h2, h3) currently lack this style.

For example, visit https://nodejs.org/api/process.html#processmemoryusagerss. The expected behavior is that the h3 heading "process.memoryUsage.rss()" should not be obscured by the header. An example of an h2 heading is https://nodejs.org/api/process.html#process.

This PR applies the scroll-margin-top rule to h2 and h3 elements containing :target anchors. Per this feedback, it also removes the @supports rule, which is no longer necessary.

Merge request reports

Loading