Title: Fix code block width overflow causing navigation menu to shrink #472 by DhanashreePetare · Pull Request #816 · git/git.github.io · GitHub
Open Graph Title: Fix code block width overflow causing navigation menu to shrink #472 by DhanashreePetare · Pull Request #816 · git/git.github.io
X Title: Fix code block width overflow causing navigation menu to shrink #472 by DhanashreePetare · Pull Request #816 · git/git.github.io
Description: 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: Navigation menu to be squeezed into a very narrow column Poor rendering on mobile screens Horizontal scrolling required for the entire page This was particularly noticeable in Rev News editions 66 and 68. Solution Modified CSS for pre and pre.sh_sourceCode elements to: Changed white-space: pre-wrap to white-space: pre (prevents line wrapping) Added overflow-x: auto (enables horizontal scrolling within code blocks only) Added max-width: 100% (constrains code blocks to content width) Key Improvements Over Previous Attempt (#668) ✅ No font size changes - readability maintained across all screen sizes ✅ Only affects code blocks - no impact on other page elements ✅ Minimal, focused CSS changes (6 lines added/modified) ✅ Works seamlessly on desktop and mobile devices Files Changed css/main.css - Updated code block styling (7 lines modified)
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/git/git.github.io/pull/816
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ca3ae422-9a6a-f934-a0e4-a8af7e5f88cb |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A73E:157C65:F484A0:146BFAC:6B010EB6 |
| html-safe-nonce | a08cbdd1ec5241d67f71a96b9e8fa658fc1cde5aef60060acba109f079fb123c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzNFOjE1N0M2NTpGNDg0QTA6MTQ2QkZBQzo2QjAxMEVCNiIsInZpc2l0b3JfaWQiOiI1MDM4Nzk3NjY4NTgzODA0NTk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8cc835e2afa08902e36c0bb973ac22c2685e3b96bf8a655739fef33f99b15fd3 |
| hovercard-subject-tag | pull_request:3140616373 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/git/git.github.io/pull/816/files |
| twitter:image | https://avatars.githubusercontent.com/u/149879716?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/149879716?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/git/git.github.io git https://github.com/git/git.github.io.git |
| octolytics-dimension-user_id | 18133 |
| octolytics-dimension-user_login | git |
| octolytics-dimension-repository_id | 16789090 |
| octolytics-dimension-repository_nwo | git/git.github.io |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16789090 |
| octolytics-dimension-repository_network_root_nwo | git/git.github.io |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width