Skip to content

RDoc-3611 Fix scroll for TOC#2376

Open
mateuszbartosik wants to merge 1 commit intoravendb:mainfrom
mateuszbartosik:RDoc-3611
Open

RDoc-3611 Fix scroll for TOC#2376
mateuszbartosik wants to merge 1 commit intoravendb:mainfrom
mateuszbartosik:RDoc-3611

Conversation

@mateuszbartosik
Copy link
Copy Markdown
Contributor

@mateuszbartosik mateuszbartosik commented Mar 31, 2026

Issue link

https://issues.hibernatingrhinos.com/issue/RDoc-3611

Additional description

Fixed scroll for sticky ToC

Type of change

  • Content - docs
  • Content - cloud
  • Content - guides
  • Content - start pages/other
  • New docs feature (consider updating /templates or readme)
  • Bug fix
  • Optimization
  • Other

Changes in docs URLs

  • No changes in docs URLs
  • Articles are restructured, URLs will change, mapping is required (update /scripts/redirects.json file, set Documents Moved PR label)

Changes in UX/UI

  • No changes in UX/UI
  • Changes in UX/UI (include screenshots and description)
image

@mateuszbartosik mateuszbartosik requested a review from kalczur March 31, 2026 12:05
.table-of-contents {
padding: 0;
@apply p-0 overflow-y-auto;
max-height: calc(100vh - 110px - 4rem);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's avoid magic numbers. Put it in a variable e.g. --toc-desktop-top: 110px;, then use it here and in a new class .toc-desktop.
Same for 4rem, but IDK where it belongs


return (
<div className="sticky top-[160px]">
<div className="sticky top-[110px]">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
<div className="sticky top-[110px]">
<div className="sticky toc-desktop">

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.

2 participants