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
Open
Conversation
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>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added CSS rules to allow inline code elements to wrap text instead of causing horizontal overflow on the page layout.
Changes
<code>elements that are not inside<pre>tags to enable text wrappingwhite-space: normalto allow line breaks within inline codeoverflow-wrap: anywhereandword-break: break-wordto break long code snippets at appropriate pointsDetails
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