Fix code block width overflow causing navigation menu to shrink #472#816
Fix code block width overflow causing navigation menu to shrink #472#816DhanashreePetare wants to merge 1 commit intogit:masterfrom
Conversation
|
Hi @DhanashreePetare, |
Hi @mjaix (Markus), Thank you for taking the time to review this PR! The issue may not be immediately visible on all pages since it specifically occurs when code blocks contain exceptionally long lines that exceed the normal content width. Let me provide specific examples: Steps to Reproduce the Issue (Without This Fix)
The Original Issue ReportThis fix addresses the concern raised by @mjaix in the original issue #472:
As @jnareb explained: "66 and 68 edition has a very slim left menu column because the contents column is exceedingly wide due to overly long line in the code block." What This PR ChangesBefore: Long lines in code blocks cause the entire content area to expand, squishing the navbar. Testing on Your SetupIf the issue isn't visible on your current browser window size, try:
Hope it helps. |
Summary
Fixes #472 - Code blocks with very long lines now scroll horizontally instead of expanding the entire page width, which was causing the navigation menu to become excessively narrow.
Problem
Code blocks containing long lines (e.g., lengthy git commands or URLs) were expanding beyond the content area, causing:
This was particularly noticeable in Rev News editions 66 and 68.
Solution
Modified CSS for
preandpre.sh_sourceCodeelements to:white-space: pre-wraptowhite-space: pre(prevents line wrapping)overflow-x: auto(enables horizontal scrolling within code blocks only)max-width: 100%(constrains code blocks to content width)Key Improvements Over Previous Attempt (#668)
Files Changed
css/main.css- Updated code block styling (7 lines modified)