Skip to content

[Aliki] Adjust table of content scrollable area height - #1459

Merged
tompng merged 1 commit into
ruby:masterfrom
tompng:toc_scroll_height
Nov 19, 2025
Merged

tompng merged 1 commit into
ruby:masterfrom
tompng:toc_scroll_height

Conversation

@tompng

@tompng tompng commented Nov 19, 2025

Copy link
Copy Markdown
Member

aside.table-of-contents .toc-sticky nav had height: calc(100vh - var(--layout-header-height))
but height should exclude padding and height of <h3>On This Page</h3> element.
This calculation is hard, so I use display:flex instead.

Left: before, Right: after
before_after

Scenario: scroll to page bottom
Left: before, Right: after
beforeafter_scrollbottom

@tompng
tompng temporarily deployed to fork-preview-protection November 19, 2025 05:39 — with GitHub Actions Inactive
@matzbot

matzbot commented Nov 19, 2025

Copy link
Copy Markdown
Collaborator

🚀 Preview deployment available at: https://037fc629.rdoc-6cd.pages.dev (commit: a9e975a)

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

@st0012 st0012 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great catch! Thanks

aside.table-of-contents .toc-sticky {
display: flex;
flex-direction: column;
height: calc(100vh - var(--layout-header-height) - var(--space-8) * 2);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add a comment explaining this calculation?

@tompng
tompng had a problem deploying to fork-preview-protection November 19, 2025 12:27 — with GitHub Actions Failure
@tompng
tompng merged commit 04c1f75 into ruby:master Nov 19, 2025
31 of 32 checks passed
@tompng
tompng deleted the toc_scroll_height branch November 19, 2025 12:52
@st0012 st0012 changed the title Adjust table of content scrollable area height [Aliki] Adjust table of content scrollable area height Nov 22, 2025

This branch had an error being deployed

1 failed deployment
fork-preview-protection — b5755468 Deployed Nov 19, 2025 by tompng via Approve Fork PR #166
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.

4 participants