Skip to content

fix(layout): pin the footer to the viewport bottom on short pages - #93

Merged
olegshulyakov merged 1 commit into
mainfrom
bugfix/92-sticky-footer-short-pages
Sep 20, 2026
Merged

olegshulyakov merged 1 commit into
mainfrom
bugfix/92-sticky-footer-short-pages

Conversation

@olegshulyakov

Copy link
Copy Markdown
Owner

Summary

  • Makes body a min-height: 100vh flex column so .primer-layout grows to fill leftover space, landing the footer on the window's bottom edge on short pages instead of right under the content. Previously this only happened by accident, via .primer-sidebar's fixed height — which stopped applying once the sidebar hides below 1011.98px, leaving a dead gap under the footer on mobile/tablet.
  • Stretches .primer-sidebar to its actual grid row (capped with max-height) instead of a flat 100vh, so on desktop it no longer overshoots the footer by its own height on short pages (which pushed the footer below the fold on tall windows), while still scrolling a long nav list within its own box on long pages.

Closes #92

Test plan

  • Short page at mobile width (375px) — footer flush at bottom, no dead gap
  • Short page at tablet width (768px) — footer flush at bottom, no dead gap
  • Short page at desktop width with a tall window (1440x1400, the reported repro) — footer visible at bottom, no overflow past viewport
  • Long page at desktop width — sidebar still caps at viewport height with its own internal scroll, footer lands at true end of page

- Make body a min-height:100vh flex column so .primer-layout grows
  to fill leftover space, landing the footer on the window's bottom
  edge instead of right under short content -- previously only
  .primer-sidebar's fixed height achieved this by accident, and that
  stopped applying once the sidebar hides below 1011.98px.
- Stretch .primer-sidebar to its grid row (capped with max-height)
  instead of a flat 100vh, so it stops overshooting the footer by
  its own height on tall windows while still scrolling its own nav
  list on long pages.

Closes #92

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@olegshulyakov
olegshulyakov merged commit 1cad8ab into main Sep 20, 2026
4 checks passed
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.

Footer does not stick to the bottom of the viewport on short pages

1 participant