Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

The copy button on single-line code blocks was too large relative to the content. This fix makes it compact and properly centered.

Changes

  • Add code-block-single-line class when code has only one line
  • Style the copy button for single-line blocks:
    • Smaller padding (2px 4px vs 6px 8px)
    • Vertically centered instead of bottom-aligned
    • Smaller icon (12px vs 14px)
  • Add Storybook story SingleLineCodeBlocks to reproduce and verify

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ammar-agent ammar-agent force-pushed the fix-single-line-code-copy-button branch 3 times, most recently from 9f811e2 to e2df2db Compare December 14, 2025 20:34
- Add code-block-single-line class when code has only one line
- Style copy button: smaller padding (2px 4px), centered vertically
- Reduce icon size from 14px to 12px for single-line blocks
- Add Storybook story to reproduce and verify the fix
@ammar-agent ammar-agent force-pushed the fix-single-line-code-copy-button branch from e2df2db to 426dee0 Compare December 14, 2025 20:42
@ammario ammario merged commit 5e85fb1 into main Dec 14, 2025
20 checks passed
@ammario ammario deleted the fix-single-line-code-copy-button branch December 14, 2025 20:54
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