Repository navigation
Conversation
A nowrap token chip grows the page and has no scrollbar. Cap the chip so the sample scrolls inside it and the page stays at the viewport. Co-Authored-By: Grok 4.7 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4287/ |
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.
Long inline code samples on API pages scroll inside the chip. The page does not gain a horizontal scrollbar from the sample, and the text stays selectable.
Affects: API reference, Site UI
Prompt summary: Add horizontal scrolling on long inline code samples on API pages. The page must not gain a horizontal scrollbar from that sample, and the sample remains selectable. Leave mobile overflow containment and still side columns on their own branches.
Why
Inline code chips in an operation description, a property list, or an example description use
white-space: nowrap. A long sample grows wider than the column. The page then scrolls sideways, and the chip has no scrollbar. A short token such asqstays a small chip.Closes elastic/docs-eng-team#880
What
Inline code chips
A long inline code sample scrolls inside its chip. The chip stops at the column width, so the page stays at the viewport. A short token keeps its own width. The text can still be selected.
Verify
Open an API operation page that contains a long inline code token. Confirm the chip scrolls horizontally, the page does not, and a short token does not show a scrollbar.
Out of scope. Viewport containment from 768px to 1023px stays on #4268. Still side columns stay on #4286.
Made with Cursor