Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Fix inline code wrapping to prevent layout overflow - #9

Open
sidwebworks wants to merge 1 commit into
mainfrom
claude/slack-session-v9tig0
Open

Fix inline code wrapping to prevent layout overflow#9
sidwebworks wants to merge 1 commit into
mainfrom
claude/slack-session-v9tig0

Conversation

@sidwebworks

@sidwebworks sidwebworks commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Added CSS rules to allow inline code elements to wrap text instead of causing horizontal overflow on the page layout.

Changes

  • Added styling to <code> elements that are not inside <pre> tags to enable text wrapping
  • Applied white-space: normal to allow line breaks within inline code
  • Added overflow-wrap: anywhere and word-break: break-word to break long code snippets at appropriate points

Details

This fix addresses an issue where long inline code snippets would overflow the page width, breaking the layout. The new CSS rules ensure that inline code respects the container boundaries while preserving the behavior of code blocks (<pre><code>) which should maintain their formatting.

https://claude.ai/code/session_016jX9xt48R365BPqmnNc6Jk


Originating Slack thread: https://carbon-ms.slack.com/archives/C0AF1HGUZ7X/p1782288061979429?thread_ts=1782287929.459699&cid=C0AF1HGUZ7X

Inline <code> elements with a single long unbroken string forced
horizontal overflow, breaking the page layout. Override the Fumadocs
preset so inline code wraps (white-space: normal + overflow-wrap),
without affecting fenced code blocks inside <pre>.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants