fix(v2): render match-rom covers at full width in Safari - #3763
Merged
Conversation
The manual "Match ROM" dialog wrapped each GameCard in a block-level cell, so the card's aspect-ratio-derived width resolved against a shrink-to-fit containing block. WebKit collapses that circular case to a near-zero width, rendering covers as thin slivers (Chromium is fine). Lay the cell out as a flex container so the card sizes via flex intrinsic sizing, the same path the gallery row already uses. Fixes #3761 Generated-By: PostHog Code Task-Id: 85199a96-11de-4403-a30e-e533cf9a8e48
Contributor
Greptile SummaryThis PR fixes Match ROM cover sizing in Safari. The main change is:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(v2): render match-rom covers at full..." | Re-trigger Greptile |
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.
Description
Explain the changes or enhancements you are proposing with this pull request.
Fixes the manual "Match ROM" dialog rendering result covers as thin vertical slivers in Safari (fine in Chromium).
Root cause
The v2
GameCardderives a non-hero card's width from a fixed height via CSSaspect-ratio(.r-gc { width: auto }→.r-gc__art { height: fixed; width: auto }→.game-cover { aspect-ratio }).GameCardis a direct flex child of its row, so WebKit resolves the width through flex intrinsic sizing (correct).MatchRomBodyGrid.vue, each card was wrapped in an extra block-level.match-grid__card-cell(flex: 0 0 auto). There the card'swidth: autoresolved against a shrink-to-fit containing block whose width depended on the card. WebKit collapses that circular case to a near-zero width, producing the slivers. Chromium resolves it via intrinsic sizing.Fix
Give
.match-grid__card-celldisplay: flexso itsGameCardbecomes a flex item and sizes via the same intrinsic-sizing path the gallery already uses. The existingmax-width: 100%caps on the card and art box are untouched, so wide-cover scaling is unchanged.AI assistance disclosure
This change was authored with AI assistance (PostHog Code): diagnosis and the CSS fix. Reviewed by the PR author.
Checklist
Please check all that apply.
Screenshots (if applicable)
Note:
npm run typecheckandtrunk fmt/trunk checkpass. Visual confirmation in Safari (both themes) still recommended before merge; a CSS-only sliver-repro isn't covered by unit tests.Created with PostHog Code