Skip to content

[Docs] fix(ui): resolve TOC scrollbar overlap and top clipping - #1203

Open
akshatsinghai6682-sketch wants to merge 3 commits into
layer5io:masterfrom
akshatsinghai6682-sketch:fix/toc-scrollbar-overlap
Open

[Docs] fix(ui): resolve TOC scrollbar overlap and top clipping #1203
akshatsinghai6682-sketch wants to merge 3 commits into
layer5io:masterfrom
akshatsinghai6682-sketch:fix/toc-scrollbar-overlap

Conversation

@akshatsinghai6682-sketch

@akshatsinghai6682-sketch akshatsinghai6682-sketch commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Notes for Reviewers

This PR fixes #1172

  • Added scrollbar-gutter: stable; and a 8px right margin to .td-sidebar-toc to prevent its custom scrollbar from overlapping the browser's native scrollbar.
  • Added track margin offsets (margin-top: 0.5rem; margin-bottom: 0.5rem;) to both .td-sidebar and .td-sidebar-toc scrollbars so their top corners/tips are not clipped under the sticky header.
  • Ensured consistent 6px width, cyan $primary thumb color, and rounded corners across both left and right sidebars.

Screenshots

Before:
Screenshot 2026-08-12 at 12 23 17 AM
After:
Screenshot 2026-08-12 at 12 23 27 AM

Signed commits

  • Yes, I signed my commits.

Summary by CodeRabbit

  • Style
    • Improved right sidebar table-of-contents scrolling and sticky positioning.
    • Added reserved scrollbar space and refined spacing for better layout consistency.
    • Updated scrollbar appearance, including a highlighted thumb on hover.

Signed-off-by: Akshat Singhai <akshatsinghai6682@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@akshatsinghai6682-sketch, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7332ed9f-2698-4504-b725-ad7276e91352

📥 Commits

Reviewing files that changed from the base of the PR and between 6d0cc72 and a63013b.

📒 Files selected for processing (1)
  • assets/scss/_styles_project.scss
📝 Walkthrough

Walkthrough

The TOC sidebar now applies sticky scrolling without an @supports gate. It reserves scrollbar space, adds right spacing, increases right padding, and customizes the WebKit scrollbar track and thumb.

Changes

TOC sidebar styling

Layer / File(s) Summary
Sidebar scrolling and scrollbar styling
assets/scss/_styles_project.scss
The TOC sidebar now applies sticky positioning and scrolling directly. It reserves scrollbar space, adds an 8px right margin, increases right padding, and adds WebKit scrollbar styling with a hover state. Blank-line placement was also adjusted.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: miacycle, parth-tussle, sbragul26

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the documentation UI fix for TOC scrollbar overlap and top clipping.
Linked Issues check ✅ Passed The changes address issue #1172 by spacing the TOC scrollbar from the native scrollbar and preventing visual overlap.
Out of Scope Changes check ✅ Passed The scrollbar spacing, positioning, and styling changes directly support the linked issue and stated PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployment: https://docs.layer5.io/pr-preview/pr-1203/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@assets/scss/_styles_project.scss`:
- Around line 314-315: Remove the blank line immediately before the position
declaration in the affected style rule, keeping padding-right and position as
consecutive declarations.
- Around line 325-341: Extend the scrollbar styling beside the existing
`.td-sidebar-toc` rules to also target `.td-sidebar`, including scrollbar width,
transparent track with the same top and bottom margins, primary thumb color,
rounded corners, and hover color. Keep TOC-specific `scrollbar-gutter` and
`margin-right` declarations scoped only to `.td-sidebar-toc`.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 76f5a754-cd7b-4f55-a912-028f70a85414

📥 Commits

Reviewing files that changed from the base of the PR and between 460b25e and 6d0cc72.

📒 Files selected for processing (1)
  • assets/scss/_styles_project.scss

Comment thread assets/scss/_styles_project.scss Outdated
Comment thread assets/scss/_styles_project.scss
Signed-off-by: Akshat Singhai <akshatsinghai6682@gmail.com>
Signed-off-by: Akshat Singhai <akshatsinghai6682@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: TOC sidebar's scrollbar (.td-sidebar-toc) overlaps browser's native scrollbar

1 participant