Skip to content

Replace dummy <span>s with scroll-margin-top for anchor navigation with fixed header #1775

Description

@jonahtanjz

Is your request related to a problem?
Current anchor navigation with fixed header is done by inserting dummy spans before the headings/panels to act as anchor points (can refer to NodeProcessor and Panels). This is to prevent the headings/panels from going under the fixed header when using anchor navigation. Previously in #1603, scroll-margin-top was introduced to panels to attempt to solve this issue without using dummy <span>s. However, at that point, IOS did not fully support the use of scroll-margin-top as it was bugged. From this site, https://caniuse.com/?search=scroll-margin-top, it seems like most modern browsers (including ios) now fully support this feature.

Describe the solution you'd like
Remove usages of dummy <span>s for anchor navigation and introduce scroll-margin-top for the fixed header.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions