Skip to content

fix: prevent horizontal scrollbar on sticky TOC#363

Merged
mmcky merged 1 commit intomainfrom
fix/toc-horizontal-scrollbar
Feb 19, 2026
Merged

fix: prevent horizontal scrollbar on sticky TOC#363
mmcky merged 1 commit intomainfrom
fix/toc-horizontal-scrollbar

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Feb 19, 2026

Fix: Horizontal scrollbar on sticky "On this page" TOC

Problem

The sticky "On this page" table-of-contents sidebar displays an unwanted horizontal scrollbar at the bottom when section titles are long enough to wrap (e.g. "13.10. Stochastic Difference Equation").

Reported in: QuantEcon/lecture-python.myst#809

Solution

Add overflow-x: hidden to the .inner.sticky container in the page TOC styles. This clips any minor horizontal overflow from wrapped text, preventing the scrollbar from appearing.

Changes

  • src/quantecon_book_theme/assets/styles/_page.scss — added overflow-x: hidden to .qe-page__toc .inner.sticky

Add overflow-x: hidden to the sticky TOC container to prevent a
horizontal scrollbar from appearing when long section titles wrap
in the 'On this page' sidebar.
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@3059878). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #363   +/-   ##
=======================================
  Coverage        ?   45.92%           
=======================================
  Files           ?        2           
  Lines           ?      405           
  Branches        ?        0           
=======================================
  Hits            ?      186           
  Misses          ?      219           
  Partials        ?        0           
Flag Coverage Δ
pytests 45.92% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

🎭 Visual Regression Test Results

passed  45 passed
skipped  1 skipped

Details

stats  46 tests across 1 suite
duration  1 minute
commit  4bdc59a

Skipped tests

mobile-chrome › theme.spec.ts › Theme Features › f-string interpolation styling

@github-actions
Copy link
Contributor

@github-actions github-actions bot temporarily deployed to pull request February 19, 2026 05:59 Inactive
@mmcky mmcky merged commit cf1c4b4 into main Feb 19, 2026
10 checks passed
@mmcky mmcky deleted the fix/toc-horizontal-scrollbar branch February 19, 2026 06:01
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