Skip to content

docs: soft-wrap API snippets and drop the install badge glyph - #46

Merged
jonathanKingston merged 1 commit into
mainfrom
claude/docs-demo-pane-scroll-4t7a2r
Jul 5, 2026
Merged

jonathanKingston merged 1 commit into
mainfrom
claude/docs-demo-pane-scroll-4t7a2r

Conversation

@jonathanKingston

Copy link
Copy Markdown
Collaborator

Follow-up polish to the live demo page (docs/index.html), after #44.

Changes

  • Soft-wrap the API snippet code. The four snippet cards sit in a two-column grid, so each card is narrow and the longer import … from '@copse/…' lines overflowed — every card showed a horizontal scrollbar. Switched the snippet <pre> to white-space: pre-wrap (+ overflow-wrap: anywhere) so long lines wrap instead of scroll. No scrollbar, nothing clipped.
  • Remove the ▲ glyph from the npm install badge. It was added as an npm-style logo mark, but a lone red triangle reads as a stray warning/error icon. The badge is now just the command text — still click-to-select-and-copy, with keyboard support.

Verification

Drove the page in headless Chromium:

  • All four .snippet-card pre blocks now report scrollWidth === clientWidth (no horizontal overflow).
  • Badge text no longer contains ; clicking still selects exactly npm install @copse/streaming-markdown.

🤖 Generated with Claude Code

https://claude.ai/code/session_019fZ4TLtD2LpAYbtx1fLPC5


Generated by Claude Code

- Soft-wrap the code in the API snippet cards (white-space: pre-wrap) so
  the narrow two-column layout no longer shows a horizontal scrollbar and
  nothing is clipped.
- Remove the ▲ glyph from the npm install badge; it read as a stray
  warning triangle. The badge is still click-to-select-and-copy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019fZ4TLtD2LpAYbtx1fLPC5
@jonathanKingston
jonathanKingston merged commit ad6c727 into main Jul 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants