Skip to content

Conversation

@swashbuck
Copy link
Contributor

@swashbuck swashbuck commented Dec 23, 2025

Fix #675

New

  • Adds html class is-scroll-at-top when the page scroll is at the top. Applies to both the menu page and content object pages.

Testing

Add custom styles to the navigation to change the look when the scroll position is at the top. Then, scroll up and down the page. Also ensure the class applies when the page first loads but before you have scrolled.

These example styles make the navigation red. Once you are no longer at the top, the nav background is partially transparent red.

.nav {
  background: red !important;
}

html:not(.is-scroll-at-top) .nav {
   background: rgba(255,0,0,0.5) !important;
}

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

Projects

Status: Needs Reviewing

Development

Successfully merging this pull request may close these issues.

Add scroll at top class

2 participants