Repository navigation
fix(docs-theme): wrap long inline code on API pages - #420
Merged
Merged
Conversation
…r per line Long values such as a search query's filter syntax ran past the card edge, and a value that wrapped drew a border only on its first and last fragments, leaving a split box. Inline code on an API page now breaks anywhere and clones its padding and border onto every line. Assisted-by: AI
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
nickvigilante
requested a deployment
to
docs-preview
November 30, 2026 18:56 — with
GitHub Actions
Waiting
nickvigilante
marked this pull request as ready for review
December 4, 2026 19:11
This branch is waiting to be deployed
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.
Merge order
Independent. It touches only
packages/docs-theme/src/brand.cssand its test, so it can merge before or after any other open PR.Summary
Inline code in the REST API reference had two faults. Long values, such as the filter syntax in the chats
qparameter, ran past the edge of their card. A value that wrapped, such as» pull_request_draftin a response schema table, drew its border only on the first and last fragments, so it looked like two separate boxes.Design or Fix
A new rule on
.coder-api-page :not(pre) > codesetsoverflow-wrap: anywhere, so a long value breaks inside its cell, andbox-decoration-break: clone, so each wrapped line keeps its own padding and border. The existing chip colours, border and radius are untouched, so theprefers-contrast: moreborder from the existing tokens still applies. Nothing is added to the page chrome, so layout shift is unchanged, and there are no asset URLs. The rule is scoped to API pages because the issue shows the problem only there.QA
Open each page in Firefox and Chrome. Neither Firefox nor the preview was checked by me, so mark the Firefox steps as unverified until you have looked.
qparameter in the query parameters. Narrow the window to about 600 px wide. Every inline code chip, including the longstatus:<waiting|running|...>one, stays inside the card, with no horizontal scrolling and nothing running under the sidebar.» pull_request_draft). The chip shows a complete rounded border around each line, not an open edge where the line breaks.Pages to compare
qparameter stays in its cardThe preview alias always serves the latest deploy of this PR and needs a Vercel login. The preview host above is my best guess at the alias, so use the link from the
docs previewstatus if it differs.Testing
A new test in
packages/docs-theme/scripts/brand.test.mjsparsesbrand.csswith postcss and asserts both declarations. It failed against the old CSS (overflow-wrapwas undefined) and passes now. All 39@coder/docs-themetests pass, and that package's lint (Oxfmt and Stylelint) is clean. I did not render an API page in a browser: the fixture corpus has no API page, so the visual result is unverified here.Upstream
No. This is our own CSS for how Coder's theme styles fumadocs-openapi output, not a bug in fumadocs-ui or fumadocs-core.
Linear: https://linear.app/codercom/issue/DOCS-1740/fix-inline-code-styling-and-wrapping-in-api-docs
🤖 Built with AI assistance.