Scroll wide article tables horizontally#364
Conversation
Cap the sticky sidebar on article pages to the viewport height and let it scroll internally, so TOC entries below the fold stay reachable. Refs hackers-pub#363 Assisted-by: Claude Code:claude-fable-5
Make tables in article bodies scroll within the content column instead of overlapping the sidebar. Fixes hackers-pub#363 Assisted-by: Claude Code:claude-fable-5
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughChangesArticle layout
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request adds horizontal scrolling to tables in prose and makes the article aside sidebar vertically scrollable with a maximum height. Feedback was provided on the table styling, pointing out that applying display: block to a <table> element causes accessibility issues with screen readers and layout bugs. It is recommended to wrap tables in a scrollable container instead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| .prose table { | ||
| display: block; | ||
| overflow-x: auto; | ||
| } |
There was a problem hiding this comment.
Applying display: block to a <table> element is a common workaround for horizontal scrolling, but it has significant drawbacks:\n\n1. Accessibility (a11y) Issue: Changing the display property of a table to block or inline-block causes many screen readers (such as VoiceOver on macOS/iOS) to lose the table's semantic role. It will no longer be announced as a table, and users won't be able to use table navigation commands.\n2. Layout Issues: It breaks table-specific CSS properties (like table-layout: fixed) and can cause columns or the table itself to not stretch properly to 100% width in some browsers.\n\nRecommendation:\nInstead of changing the table's display property in CSS, wrap the tables in a scrollable container (e.g., <div class="overflow-x-auto"><table>...</table></div>) during the Markdown-to-HTML rendering process (for example, using a rehype plugin or custom markdown renderer on the backend). This preserves both accessibility and standard table layout behavior.
Make tables in article bodies scroll within the content column instead
of overlapping the sidebar.
Fixes #363
Assisted-by: Claude Code:claude-fable-5