Skip to content

fix: Box-link component text overflow and improve layout - #322

Merged
ainsleyclark merged 1 commit into
mainfrom
claude/conference-overflow-gophercon-refs-7li5mo
Aug 12, 2026
Merged

ainsleyclark merged 1 commit into
mainfrom
claude/conference-overflow-gophercon-refs-7li5mo

Conversation

@ainsleyclark

Copy link
Copy Markdown
Collaborator

Summary

Improved the box-link component's handling of text overflow and layout constraints to prevent long headings and descriptions from pushing the arrow icon outside the container bounds.

Key Changes

  • Container constraints: Added gap, max-width, and overflow: hidden to the main box-link element to establish proper layout boundaries
  • Content wrapper flexibility: Changed from flex-grow: 2 to flex: 1 1 auto with min-width: 0 to allow text content to shrink below its intrinsic width when needed
  • Heading styling: Replaced fixed width: 80% with max-width: 100% for better responsiveness
  • Description improvements:
    • Added max-width: 100% and overflow-wrap: break-word to handle long text
    • Increased line-height from 1 to 1.2 for better readability
  • Arrow icon: Added flex-shrink: 0 to prevent the arrow from being compressed
  • Minor content fix: Updated citation format in conference content (Ryan & Deci, 2000 with publication details)

Implementation Details

The key fix involves using min-width: 0 on the flex container, which allows flex items to shrink below their content size. This prevents long text from overflowing the container while maintaining proper spacing with the arrow icon via the gap property.

https://claude.ai/code/session_011bP6Fds63DMH4nj9SWzGTr

The box link text container was a flex item with the default
min-width: auto, so a nowrap heading contributed its full intrinsic
width and pushed the arrow outside the box, which in turn gave the
conference single page a horizontal scrollbar on narrow viewports.

Let the text shrink below its intrinsic width, cap the heading at the
available space instead of a fixed 80%, and stop the arrow shrinking.
Also correct the author order on the Self-Determination Theory source
for the GopherCon UK 2026 talk (Ryan & Deci, not Deci & Ryan).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011bP6Fds63DMH4nj9SWzGTr
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
ainsleyclark.com Ignored Ignored Aug 12, 2026 6:30am
ainsleydev Ignored Ignored Aug 12, 2026 6:30am

Request Review

@ainsleyclark ainsleyclark changed the title Fix box-link component text overflow and improve layout fix: Box-link component text overflow and improve layout Aug 12, 2026
@ainsleyclark
ainsleyclark merged commit e801742 into main Aug 12, 2026
11 checks passed
@ainsleyclark
ainsleyclark deleted the claude/conference-overflow-gophercon-refs-7li5mo branch August 12, 2026 06:33
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