Skip to content

Offset the content by the navigation bar height also for direct links #16

@KasparEtter

Description

@KasparEtter

When linking directly to a section of the spec like this, the title is covered by the navigation bar. There are two ways to offset the content correctly:

  • CSS: Use a positive padding with a negative margin on all headings.
  • JS: Recognize when the page is loaded with an anchor and call the scroll animation with this anchor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions