Skip to content

rustdoc: highlight all anchored headings on click #86012

Closed
@jsha

Description

@jsha

When you visit on a rustdoc URL with a fragment linking to a specific method (e.g. https://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_bytes), or when you click an internal link from the sidebar, the method declaration is highlighted.

However, if you click an internal section heading in the sidebar, or visit a URL with such a fragment, there is no highlighting. This is particularly noticeable on short pages (like module pages, e.g. https://doc.rust-lang.org/nightly/std/option/index.html#enums), where the section heading can't be moved all the way to the top of the page. You can wind up clicking on a sidebar link and not immediately seeing the heading you selected because it's towards the bottom of the page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions