Skip to content

Offset in-page anchor jumps below the fixed navbar - #2026

Merged
mrmundt merged 1 commit into
USRSE:mainfrom
lparsons:fix-navbar-anchor-scroll-offset
Sep 18, 2026
Merged

mrmundt merged 1 commit into
USRSE:mainfrom
lparsons:fix-navbar-anchor-scroll-offset

Conversation

@lparsons

Copy link
Copy Markdown
Member

Description

Adds a scroll-padding-top rule on the html element so that following an in-page anchor link scrolls the target below the fixed (sticky) navbar instead of leaving it hidden behind the navbar. The offset (3.25rem) matches the Bulma fixed-navbar height, and applies to in-page anchor jumps site-wide.

Checklist:

  • I have previewed changes locally or with CircleCI (runs when PR is created)
  • I have completed any content reviews, such as getting input from relevant working groups. If no, please note this and wait to post the PR to the #website channel until the content has been settled.

This is a small style/functionality fix with no content changes.

When you are ready for a technical review/merge, post the for the link for the PR in the US-RSE Slack (#website) to ask for reviewers.

Add scroll-padding-top to the html element so that linking to an
in-page anchor scrolls the target below the sticky navbar instead of
hiding it behind it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lparsons

Copy link
Copy Markdown
Member Author

@USRSE/usrse-maintainers Please review. This affects the entire site, but seems to work better, at least in my limited testing. Feel free to ignore or provide a better fix though.

@mrmundt
mrmundt merged commit 2f09187 into USRSE:main Sep 18, 2026
2 of 3 checks passed
@lparsons

lparsons commented Sep 18, 2026 •

Copy link
Copy Markdown
Member Author

Follow-up for anyone landing here later: this didn't fully resolve the anchor-scroll issue (#1483) in production — it turned out assets/css/style.scss was silently colliding with a pre-existing static assets/css/style.css at the same output path, so this rule never actually reached the live site. The actual fix is proposed in #2062, and the underlying architectural issue that caused the collision (a 12k-line vendored, hand-maintained CSS file with no real build step) is tracked separately in #2063.

exoticDFT pushed a commit that referenced this pull request Sep 30, 2026
PR #2026 added assets/css/style.scss to set scroll-padding-top, but the
repo already has a hand-maintained assets/css/style.css that compiles to
the same output path. Jekyll's production build was serving the static
style.css and silently dropping the Sass-compiled file, so the new rule
never reached us-rse.org even though the PR merged and Pages rebuilt
successfully.

Move the rule directly into the static style.css and remove the now
unnecessary style.scss.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@lparsons
lparsons deleted the fix-navbar-anchor-scroll-offset branch September 30, 2026 22:09
exoticDFT pushed a commit that referenced this pull request Sep 30, 2026
style.css is a pre-compiled Bulma snapshot with hand edits and no Sass
build, which isn't obvious to contributors. A sibling style.scss silently
shadowed it in #2026. Add a header comment and a docs/details.md section
explaining how to change styles, plus a CI job that fails when a Sass file
would compile to the path of an existing static .css file.

Part of #2063 (phases 1 and 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants