Skip to content

fix(components:grid_container): prevent card overflow on tablet#48

Merged
mglaman merged 1 commit intomainfrom
worktree-card-component-tablet
Apr 16, 2026
Merged

fix(components:grid_container): prevent card overflow on tablet#48
mglaman merged 1 commit intomainfrom
worktree-card-component-tablet

Conversation

@mglaman
Copy link
Copy Markdown
Contributor

@mglaman mglaman commented Mar 31, 2026

Summary

  • Fixes cards being clipped or hidden outside the viewport in Drupal Canvas tablet mode
  • Root cause: w-full + mx-6 on GridContainer's centering wrapper made the element parent-width + 48px wide, overflowing by 24px on the right and clipping the 3rd card column
  • Fix: replace mx-6 (external margin → overflow) with px-6 (internal padding → no overflow), keeping w-full intact for correct flex child sizing

Test plan

  • Open the Card Container story at 768px viewport width (tablet breakpoint)
  • Confirm all 3 cards in 33-33-33 layout are fully visible with no horizontal clipping
  • View Four Column Layout story (25-25-25-25) and verify all 4 cards render correctly at tablet
  • Open the Grid Container stories and confirm gutters still render correctly across all layout variants

🤖 Generated with Claude Code

…let overflow

Using w-full with mx-6 caused the container to exceed its parent width by 48px,
clipping the rightmost card column on tablet viewports. Switching to px-6 provides
the same visual gutter via padding without causing horizontal overflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@acquia-stalebot-platauto acquia-stalebot-platauto bot added the stale Stale Pull Request label Apr 16, 2026
@acquia-stalebot-platauto
Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the stale label to avoid it being closed. Thank you for your contributions. More info: https://github.com/acquia/devops-github-administration/blob/main/docs/operations_related_to_repositories.md#acquia-stale-bot

@mglaman mglaman requested a review from balintbrews April 16, 2026 13:55
@mglaman mglaman removed the stale Stale Pull Request label Apr 16, 2026
@mglaman mglaman merged commit 9ca9c44 into main Apr 16, 2026
@mglaman mglaman deleted the worktree-card-component-tablet branch April 16, 2026 14:04
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