Skip to content

fix(cards): align author/source stack with title on grid cards#6347

Merged
tsahimatsliah merged 2 commits into
mainfrom
fix/squad-card-avatar-alignment
Jul 22, 2026
Merged

fix(cards): align author/source stack with title on grid cards#6347
tsahimatsliah merged 2 commits into
mainfrom
fix/squad-card-avatar-alignment

Conversation

@tsahimatsliah

@tsahimatsliah tsahimatsliah commented Jul 22, 2026

Copy link
Copy Markdown
Member

Problem

After #6331, grid cards that have both an author and a source (e.g. a post shared into a squad) render their avatar/source stack ~6px to the left of the title. Author-less cards (default article, collection) stayed aligned, which is why the squad card looked off next to them.

Cause

AuthorSourceStack renders a <div>. The grid CardHeader uses -mx-1.5 and relies on .header > a, .header > button { margin: 0 .375rem } to cancel it for the leading avatar. That rule only matches bare <a>/<button> avatars — not the new stack <div> — so the stack keeps the -mx-1.5 and shifts left.

Fix

Add the matching mx-1.5 to the stack in the grid PostCardHeader, mirroring the bare-avatar compensation. Scoped to that header only; the freeform and list headers don't use -mx-1.5, so they're unchanged.

Verification

Storybook → Components/Cards/Feed Cards Overview → Grid Cards: all five card types (article, poll, share, squad, collection) now align the lead avatar box with the title (was 11px vs 17px on article/share). List cards were already aligned. Strict typecheck + ESLint pass.

Preview domain

https://fix-squad-card-avatar-alignment.preview.app.daily.dev

The AuthorSourceStack renders a <div>, so it missed the
`.header > a, .header > button { margin: 0 .375rem }` compensation that
offsets CardHeader's `-mx-1.5` for bare avatars. Any grid card with both
an author and a source (e.g. a post shared into a squad) therefore sat
~6px left of the title. Add the matching `mx-1.5` so the stack lines up
with the title like every other card type.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jul 22, 2026 12:09pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Jul 22, 2026 12:09pm

Request Review

@tsahimatsliah
tsahimatsliah merged commit a56eefb into main Jul 22, 2026
12 checks passed
@tsahimatsliah
tsahimatsliah deleted the fix/squad-card-avatar-alignment branch July 22, 2026 13:31
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