Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Switch to scroll-margin #84

@lishaduck

Description

@lishaduck

Explanation

We're currently using hacky CSS when the platform literally supports this out of the box with scroll-margin-top.

Steps

  • Go to
    // Many, many thanks to <https://getpublii.com/blog/one-line-css-solution-to-prevent-anchor-links-from-scrolling-behind-a-sticky-header.html>!
    class="scroll-smooth scroll-pt-60 sm:scroll-pt-44 md:scroll-pt-28 lg:scroll-pt-20 scrollbar-thin scrollbar-track-green-900/10 scrollbar-thumb-green-400/90 dark:scrollbar-track-green-100/10 dark:scrollbar-thumb-green-600/90"
  • Replace it with a scroll-mt-#

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions