store: logos on a luminance-picked light/dark tile#42
Merged
Conversation
Listing logos are transparent PNGs but were shown with object-fit:cover over the gradient avatar, so the empty areas revealed the teal→blue gradient (muddy/purplish) and the logo got cropped. Render the logo contained (never cropped) in a padded, bordered tile and choose the backdrop from the logo's own opaque-pixel luminance: bright logos get a dark tile, dark logos a light tile (CORS-tainted/opaque-less icons fall back to dark). Initials avatar is unchanged for icon-less listings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
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
Extension listing logos are transparent PNGs, but the store rendered them with
object-fit: coverover the gradient avatar background. Result: the logo's transparent areas revealed the teal→blue avatar gradient (reads muddy/purplish) and the logo itself got cropped. Visible onstore/extension.html?slug=coinpay-wallet.Fix
coverover the gradient.Before/after (CoinPay logo, luminance 154/255 → dark tile):
Old: transparent logo bled into the teal→blue gradient, cropped.
New: mark contained on a clean dark tile.
Self-contained change to
store.js+store.css;node --checkclean. Luminance sampling runs client-side on a 24×24 canvas at render time.🤖 Generated with Claude Code