fix: constrain TOC vertical divider height to TOC content on blog post pages#1689
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@copilot fix the scrolling issue happening now. |
Fixed in ef7f99a. The scrolling issue was caused by The fix moves Screenshots: Top of page — border matches TOC height: Here's a local preview showing the result — the vertical line only spans the TOC, the TOC remains sticky while scrolling, and there's no scrollbar: |
The left border on the TOC sidebar column spanned the full page height. The fix moves the
border-leftto the sticky inner TOC wrapper so the vertical divider line only spans the height of the table of contents content. The column'salign-selfis restored tostretchto preserve correct sticky scrolling behaviour, and the internal scrollbar is hidden while keeping scroll functionality for long TOCs.Type of Change
Changes Made
src/css/custom.css— Removedborder-leftfrom.blog-wrapper .container>.row>.col.col--2(the full-height column) and restoredalign-self: stretchon it.src/css/custom.css— Addedborder-left: 2px solid var(--ifm-toc-border-color)to.blog-wrapper .col.col--2 > div(the sticky inner wrapper) so the vertical line only spans the TOC content height.src/css/custom.css— Addedscrollbar-width: noneand::-webkit-scrollbar { display: none }to the sticky inner wrapper to hide the browser scrollbar while keeping overflow-y scroll for long TOCs.Dependencies
None.
Checklist
npm run buildand attached screenshot(s) in this PR.