Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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