Skip to content

fix(toc): sticky TOC left a large gap before the post header on desktop#320

Merged
williamzujkowski merged 1 commit into
mainfrom
fix/toc-alignment
Jul 20, 2026
Merged

fix(toc): sticky TOC left a large gap before the post header on desktop#320
williamzujkowski merged 1 commit into
mainfrom
fix/toc-alignment

Conversation

@williamzujkowski

Copy link
Copy Markdown
Owner

On ≥1280px, the 'On this page' rail inflated the grid's first row and shoved the post title/header ~565px down, leaving a big empty gap after the breadcrumb (reported on the oklch post).

Cause: .post-article has no explicit grid-template-rows, so the TOC's grid-row: 1 / -1 resolved to row 1 only and sized that row to the TOC's own height. Fix: span all content rows explicitly (1 / span 99); empty implicit rows stay 0-height. Diagnosed and verified in Chrome at 1440px — header now sits directly below the breadcrumb, aligned with the TOC top. CSS-only.

🤖 Generated with Claude Code

.post-article has no explicit grid-template-rows, so the TOC's
'grid-row: 1 / -1' resolved to just row 1 and inflated it to the TOC's
own ~565px height — pushing the post header down and leaving a large
empty gap between the breadcrumb and the title on >=1280px. Span all
content rows explicitly instead. Verified in Chrome: header now sits
directly below the breadcrumb, aligned with the TOC top.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@williamzujkowski
williamzujkowski merged commit e086568 into main Jul 20, 2026
9 checks passed
@williamzujkowski
williamzujkowski deleted the fix/toc-alignment branch July 20, 2026 05:04
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