Skip to content

Conversation

@bewithgaurav
Copy link

@bewithgaurav bewithgaurav commented Feb 9, 2026

Problem

Skills with long code examples (400+ characters per line) cause horizontal page overflow, making the skill page ~5934px wide instead of staying within the viewport.

Affected skills: Skills with inline browser automation commands like:

browser act profile=openclaw request='{"fn":"() => { /* very long JS */ }", "kind":"evaluate"}'

Current behavior:

  • Page becomes ~5934px wide
  • Horizontal scrolling required at page level
  • UI feels "wobbly"

Root Cause

.markdown pre elements already have overflow-x: auto (good!), but parent containers had no width constraints and expanded infinitely to fit content width.

Solution

Added max-width: 100% and overflow-x: auto to parent containers:

  • .skill-detail-stack
  • .tab-card
  • .tab-body
  • .file-list
  • .file-list-body
  • .markdown
  • .markdown pre

Result:

  • ✅ Page stays within viewport width (1200px)
  • ✅ Code blocks scroll horizontally within tab content area
  • ✅ No visual changes to properly-sized content

Testing

Verified on https://clawhub.com/skills/zepto which has 675-char lines in SKILL.md

  • Before: Page width 5934px
  • After: Page width 1200px, scrollbar appears in tab content area

Demo

Applied CSS fix live in browser, confirmed:

  • Document width: 1200px (fixed! ✅)
  • Tab body has horizontal scrollbar
  • Code blocks fully accessible via scroll

- Add max-width: 100% to .file-list-body and .file-row
- Prevents page-wide overflow when skills contain long code examples
- Markdown pre blocks already have overflow-x: auto, but parent containers were expanding infinitely
- Fixes issue where skills with 400+ char lines (e.g. browser automation commands) cause horizontal scrolling

Affected: Skills with long inline code in markdown (browser act commands, etc.)
@vercel
Copy link
Contributor

vercel bot commented Feb 9, 2026

@bewithgaurav is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

- Also ensures .file-list-body constraint is inherited properly
- Prevents long code blocks from expanding file list container
- Add max-width: 100% to .markdown, .tab-body, .markdown pre
- Ensures code blocks are constrained and show horizontal scrollbar
- Prevents content from expanding parent containers beyond viewport
Adds overflow-x: auto to .skill-detail-stack, .tab-card, and .tab-body
to ensure long code blocks are scrollable within the content area
instead of causing page-wide horizontal overflow.

Fixes horizontal overflow issue on skill pages with long code examples
(e.g., browser automation commands with 400+ character lines).

Tested on zepto skill page - page now stays within viewport (1200px)
and code blocks are accessible via horizontal scrollbar in tab area.
@bewithgaurav bewithgaurav changed the title Fix: Prevent horizontal overflow from long code blocks in skill pages fix: prevent horizontal overflow from long code blocks in skill pages Feb 10, 2026
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.

1 participant