Skip to content

Scroll long inline code samples on API pages - #4287

Closed
reakaleek wants to merge 1 commit into
mainfrom
api-catalog-inline-scroll
Closed

reakaleek wants to merge 1 commit into
mainfrom
api-catalog-inline-scroll

Conversation

@reakaleek

Copy link
Copy Markdown
Member

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 as q stays 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

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>
@reakaleek reakaleek added the bug label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4287/

@reakaleek reakaleek closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant