fix: code block alignment in Simplicity & Migration sections#407
Merged
Conversation
Flatten HTML whitespace inside <code> elements to eliminate alignment discrepancies caused by mixed indentation in the source. Replace mobile CSS word-break: break-all with overflow-x: auto and white-space: pre for proper code rendering on narrow screens. Encode bare & as & for HTML validity.
dac0441 to
6eb61a5
Compare
This was referenced May 21, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The code examples in the Simplicity and Migration bento cards on the landing page had alignment issues, particularly visible on mobile.
Root cause
The
<code>elements contained multi-line HTML where the first line was indented with the tag but subsequent lines started at column 0. Since mobile CSS appliedwhite-space: pre-wrap, the literal newlines and inconsistent whitespace in the HTML source rendered as visible misalignment.Additionally,
word-break: break-allon mobile could split code tokens mid-character.Changes
HTML (
docs/index.html):<code>content in both Simplicity and Migration blocks onto single lines, eliminating extraneous whitespace between<br>and<span>tags&as&for HTML validityCSS (mobile media query):
word-break: break-all+white-space: pre-wrapwithoverflow-x: autoon.code-blockandwhite-space: preon.code-block codeVerification
Open
docs/index.htmlin a browser and check both desktop and mobile (375px) views — code blocks should have uniform left-aligned lines with no mid-word breaks.