fix(cards): keep hero TLDR fully visible under glass action bar#6319
fix(cards): keep hero TLDR fully visible under glass action bar#6319tsahimatsliah wants to merge 2 commits into
Conversation
In glass mode the floating action pill sits over the bottom of the hero card's content column. A full-size (typo-title1) 3-line title plus a 3-line TLDR overflowed the clipped area, so the TLDR's last line was cut off behind the pill. Keep the hero title at up to 3 lines (title text matters) and instead shrink it one type step to typo-title2 when a TLDR is present — still larger than the default card's typo-title3, preserving the hero > default hierarchy. Also tighten two glass-only top margins so a 3-line title and 3-line TLDR both clear the pill with room to spare. Adds a HeroGlassOverlap Storybook page covering the title/TLDR/metric matrix and updates the card spec. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Self-review (automated, high-effort)Ran a multi-angle review (correctness, cross-file, cleanup, CLAUDE.md conventions). Diff is small and scoped; no correctness bugs found in the changed code, no convention violations. Non-glass behavior is preserved exactly ( One consistency note (not blocking): the same pre-fix pattern this PR fixes in
They render |
Problem
On hero (featured-wide) cards, the floating glass action pill sits
absolute inset-x-2 bottom-2over the bottom of the content column. A full-size (typo-title1) 3-line title plus a 3-line TLDR overflow the clipped text area inside the fixedmin-h-cardGlass(21.5rem) card, so the TLDR's last line gets cut off behind the pill.Fix
Keep the hero title at up to 3 lines (the title text is important — we don't drop a line) and instead shrink it one type step to
typo-title2when a TLDR is present.typo-title2(24px) is still larger than the default card title (typo-title3, 20px), so the hero > default hierarchy is preserved. Two glass-only top margins (header→title,metadata→TLDR) are tightened by 4px each so a 3-line title + 3-line TLDR clear the pill with ~6px to spare.typo-title1, 28px).typo-title2(24px), 3 lines, TLDR fully visible.Verification
Measured across the full title × TLDR × metrics matrix in Storybook — no card clips the TLDR in any combination. Cards with a TLDR resolve to a 24px title, cards without to 28px.
typecheck-strict-changed)typo-title2(+line-clamp-3) with a TLDR andtypo-title1withoutStorybook
Adds Components → Cards → Hero Glass Overlap — a diagnostic page rendering the real
ArticleFeaturedWideGridCardacross a title/TLDR/metric matrix, so the overlap cases (and the fix) are visible side by side.🤖 Generated with Claude Code
Preview domain
https://claude-fix-hero-glass-tldr-overl.preview.app.daily.dev