Skip to content

Fix scroll-padding-top not reaching live site (style.css/scss collision) - #2062

Merged
exoticDFT merged 1 commit into
USRSE:mainfrom
lparsons:fix-style-scss-css-collision
Sep 30, 2026
Merged

exoticDFT merged 1 commit into
USRSE:mainfrom
lparsons:fix-style-scss-css-collision

Conversation

@lparsons

@lparsons lparsons commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Fixes #1483

Summary

  • PR Offset in-page anchor jumps below the fixed navbar #2026 added assets/css/style.scss to set scroll-padding-top so in-page anchor jumps aren't hidden behind the fixed navbar. That merged cleanly and GitHub Pages rebuilt successfully, but the site already has a hand-maintained, statically-committed assets/css/style.css that Jekyll compiles/copies to the same output path (/assets/css/style.css).
  • On GitHub's production build, the static style.css (12,262 lines of vendored/custom CSS) wins over the Sass-compiled style.scss, so the new rule silently never reached us-rse.org — no build error, just a destination-path collision.
  • This PR moves the scroll-padding-top rule directly into assets/css/style.css (alongside the other hand-added custom rules at the end of the file) and removes the now-unnecessary style.scss.

Verified with a local bundle exec jekyll build: previously the compiled output only contained ~10 lines (the Sass file, since site.theme isn't set the @import pulled in nothing); now the full 12,262-line stylesheet is emitted with scroll-padding-top: 3.25rem; included.

Test plan

  • bundle exec jekyll build succeeds
  • Built assets/css/style.css contains the full existing stylesheet plus scroll-padding-top: 3.25rem;
  • No .scss file remains to collide with the static .css at the same destination path

🤖 Generated with Claude Code

PR USRSE#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

Copy link
Copy Markdown
Member Author

@USRSE/usrse-maintainers This is a second attempt to fix the scrolling bug (#1483). I believe this will actually work, though it's a bit of a quick fix. Issue #2063 describes the larger issue. I'd recommend merging this fix and working on the larger refactor later.

@exoticDFT exoticDFT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The offset is working for a few pages I checked. Also, seems to work well enough for places where anchors have been manually added.

@exoticDFT
exoticDFT merged commit ac122a7 into USRSE:main Sep 30, 2026
2 of 3 checks passed
@lparsons
lparsons deleted the fix-style-scss-css-collision branch September 30, 2026 22:09
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.

Fix jump-to-section alignment on website

2 participants