Skip to content

[UI] fix(docs): prevent wide code blocks from pushing sidebar off-screen#1150

Open
KumarNirupam1 wants to merge 2 commits into
layer5io:masterfrom
KumarNirupam1:fix/1147-smtp-guide-layout-misaligned
Open

[UI] fix(docs): prevent wide code blocks from pushing sidebar off-screen#1150
KumarNirupam1 wants to merge 2 commits into
layer5io:masterfrom
KumarNirupam1:fix/1147-smtp-guide-layout-misaligned

Conversation

@KumarNirupam1

Copy link
Copy Markdown
Contributor

Description

PR fixes : #1147

On the SMTP guide (/cloud/guides/self-hosted/operating/smtp/), long log and code blocks were expanding the main content column past the viewport. That pushed the right "On this page" sidebar off-screen and required horizontal scrolling to read the page inconsistent with other docs pages.

This PR applies a minimal CSS-only fix:

  • Added min-width: 0 to .row > main so the flex column can shrink within the layout instead of growing with wide content.
  • Added overflow-x: auto and max-width: 100% to .td-content pre and .td-content .highlight so long lines scroll inside the code block instead of stretching the page.

No markdown, HTML, or JS changes. The SMTP page exposed the issue, but the fix applies globally to any page with long code blocks.

Screenshot/video

Screen.Recording.2026-07-11.102218.mp4

Signed commits

  • Yes, I signed my commits.

…ing blocks

Signed-off-by: Kumar Nirupam <kumar.nirupam24@gmail.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces layout and overflow improvements in SCSS files, adding 'min-width: 0' to the main content container and 'overflow-x: auto' with 'max-width: 100%' to preformatted blocks and '.highlight' containers to handle horizontal overflow. The reviewer suggested resetting 'overflow-x' to 'visible' on 'pre' elements nested inside '.highlight' to prevent potential redundant or double scrollbars in some browsers.

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.

Comment thread assets/scss/_styles_project.scss
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployment: https://docs.layer5.io/pr-preview/pr-1150/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

Signed-off-by: Kumar Nirupam <kumar.nirupam24@gmail.com>
@KumarNirupam1

Copy link
Copy Markdown
Contributor Author

@Sbragul26 kindly review 🙂

@dhruveshmishra

Copy link
Copy Markdown
Contributor

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] SMTP guide layout is misaligned

2 participants