Skip to content

Scale page-nav content before wrapping; fix scrollbar-caused centering offset - #170

Merged
brianglass merged 1 commit into
mainfrom
readings-page-layout-redesign
Aug 11, 2026
Merged

Scale page-nav content before wrapping; fix scrollbar-caused centering offset#170
brianglass merged 1 commit into
mainfrom
readings-page-layout-redesign

Conversation

@brianglass

Copy link
Copy Markdown
Owner

Summary

  • The day-nav links (Previous/Today/Next) and the tradition/calendar toggles now shrink via the same container-query technique used for the site title, instead of wrapping at almost any narrow width. They only fall back to wrapping below 400px, once the smallest scaled font no longer fits on one line.
  • Fixes main#orthocal's centering being off by ~15px (half a scrollbar-width) on narrow viewports. The page previously forced a permanent overflow-y: scroll, which reserves the scrollbar's gutter on the right edge only, throwing off margin: 0 auto centering. Switched to scrollbar-gutter: stable both-edges, which reserves the gutter symmetrically (still preventing layout shift on short pages, the original goal) while keeping content centered.

Test plan

  • docker compose run --rm tests — 142 tests pass
  • Verified page-nav scaling/no-overflow across a swept range of container widths in Chrome
  • Verified centering fix at a real (non-default) browser window width — confirmed symmetric left/right gaps for main#orthocal, the header content, and .readings-columns
  • Author to verify on an actual Android phone

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3

…g offset

The day-nav links and tradition/calendar toggles now shrink via a
container query as the topbar narrows, same technique as the site
title, instead of wrapping at almost any width -- they only fall back
to wrapping below 400px, once the smallest scaled font no longer fits.

Also replaces the permanent overflow-y:scroll (which reserved the
scrollbar's gutter on the right edge only) with scrollbar-gutter:
stable both-edges, so centered content no longer sits ~15px left of
true center -- the previous approach threw off main#orthocal's
centering by half a scrollbar-width, most noticeable on narrow
screens where that's a bigger fraction of the viewport.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
@brianglass
brianglass merged commit 5e6eebc into main Aug 11, 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.

1 participant