Skip to content

fix(code-block): enable horizontal scrolling for long lines in code blocks#439

Merged
haydenbleasel merged 2 commits intovercel:mainfrom
sleitor:fix-438
Mar 10, 2026
Merged

fix(code-block): enable horizontal scrolling for long lines in code blocks#439
haydenbleasel merged 2 commits intovercel:mainfrom
sleitor:fix-438

Conversation

@sleitor
Copy link
Contributor

@sleitor sleitor commented Mar 7, 2026

Summary

Fixes #438

Long single-line comments and other long code lines were being silently clipped inside code blocks due to overflow-hidden on the body container.

Root Cause

The CodeBlockBody wrapper div uses overflow-hidden class which clips content that overflows horizontally. Long lines (like lengthy inline comments) were cut off with no way to scroll to see the rest.

Fix

Change overflow-hidden to overflow-x-auto on the code block body container. This allows horizontal scrolling when content overflows while preserving vertical layout.

…locks

Change overflow-hidden to overflow-x-auto on the code block body container
so that long single-line comments and other long code lines are scrollable
horizontally instead of being silently clipped.

Fixes vercel#438
@vercel
Copy link
Contributor

vercel bot commented Mar 7, 2026

Someone is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@haydenbleasel
Copy link
Member

awesome, thanks @sleitor 🙏

@haydenbleasel haydenbleasel merged commit add5374 into vercel:main Mar 10, 2026
3 of 5 checks passed
@sleitor sleitor deleted the fix-438 branch March 11, 2026 00:26
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.

Comments in code blocks neither scroll nor wrap

2 participants