Repository navigation
fix(design): fit card images without cropping - #66
Merged
Merged
Conversation
plainprogrammer
marked this pull request as ready for review
October 12, 2026 14:15
Refs #35. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thumbnail size exception in FR-2, how the browser gets test images, AC-1.4 as a markup check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The maintainer ruled that the table thumbnail keeps its 2px corner as exported. No open questions remain in the spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The maintainer ruled that the card page's missing-image fallback is put inside its own slot here. Planning measured each slot in the browser: the thumbnail stretch is real (24x34 against 24x33.52), and one device pixel is too loose a tolerance to see it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six phases: test pictures in the browser, tiles and the card page, the table thumbnail (measured before and after), the card page's fallback, the pattern doc, and verification. Every block was run red and green in this worktree before the plan was written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Phase 0: Test pictures in the browser (spec 019). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Phase 1: Tiles and the card page show the whole image (spec 019). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Phase 2: The table thumbnail isn't stretched (spec 019). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Phase 2: The table thumbnail isn't stretched (spec 019). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Phase 3: The card page's fallback sits in its own slot (spec 019). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Phase 4: The design system documents the override (spec 019). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Phase 5: Integration Verification (spec 019). Grid, table and card page with pictures that aren't 63:88, at 1280px and 390px, light and dark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 5: Integration Verification (spec 019). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…019) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two new memories (browser spec gotchas for images and windows, spec 019 follow-ups) and additions to two existing ones (exact plans without a prototype branch, the pre-push gate). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plainprogrammer
force-pushed
the
019-uncropped-card-images
branch
from
October 12, 2026 19:41
fad446f to
1f42824
Compare
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.
Card images are now always shown whole and in their own proportions, in tiles, on the card page and in the table thumbnail. Closes #35.
Why
Scryfall's image guidelines say not to crop, clip or stretch card images (research 016, sections 4 and 7). The exported design system fitted tile and card page images with
object-fit: cover, which crops whenever an image isn't exactly 63:88, and the table thumbnail had no fitting rule, so it stretched its image. Measured in the suite's browser before the fix, a Scryfall-sized image (488×680) lost 0.19px from each side in a tile and was drawn 1.67% too tall in the thumbnail.What changed
collector/additions.css(Image fit (spec 019)), three rules:contain, so the whole image sits inside its 63:88 slot and any leftover showssurface-sunken;contain;components.cssandtokens.cssare untouched. The override lives inadditions.css, which a re-export doesn't replace, and is documented as theImageFitpattern (docs/design-system/components/ImageFit.md, one README line) for upstreaming.data:addresses, so the suite's browser asks no catalog source for anything.One visible side effect: a table row with an image is half a pixel shorter (53px to 52.52px), so it now matches a row without one.
Documents
Checks
bin/cion this commit: 453 files with no RuboCop offenses, 0 Brakeman warnings,1133 examples, 0 failures, 1 pending(the pending example needsCOLLECTOR_ART_AGREEMENT).Still owed
Not asserted by any example: a failed image's alternative text, which is the browser's own rendering.
Out of scope
ImageFitand the earlier app additions into the published design system.Merging alongside the spec 018 PR
Spec 018 (#34) edits the same three files:
collector/additions.css,docs/design-system/README.mdandspec/design_system_files_spec.rb. This PR's CSS block is mid-file and its examples are in adescribeof their own, to keep the overlap small. Whichever PR merges second should still expect conflicts on adjacent lines, most likely the new README line and the end of the spec file. Keep both sides, with the README lines in spec order.Screenshots
The pictures are test images that are deliberately square, tall and wide, so the fit is visible.
Collection grid, 1280px
Collection table, 1280px
Card page, 1280px
At 390px
🤖 Generated with Claude Code