fix(cards): align author/source stack with title on grid cards#6347
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
idoshamun
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
AuthorSourceStackrenders a<div>. The gridCardHeaderuses-mx-1.5and 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.5and shifts left.Fix
Add the matching
mx-1.5to the stack in the gridPostCardHeader, 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