Skip to content

fix: prevent SVG NFTs from collapsing to 0x0#2746

Open
AdamBuzzard wants to merge 2 commits intostellar:masterfrom
AdamBuzzard:fix-svg-nft-collapse
Open

fix: prevent SVG NFTs from collapsing to 0x0#2746
AdamBuzzard wants to merge 2 commits intostellar:masterfrom
AdamBuzzard:fix-svg-nft-collapse

Conversation

@AdamBuzzard
Copy link
Copy Markdown

Description

Fixes an issue where valid SVG NFTs (e.g. SEP-50 standard tokens) with width='100%' and height='100%' collapse to a 0x0 height inside the CollectibleInfo__image container. By adding an explicit aspect-ratio: 1 / 1;, it ensures that the container maintains correct square proportions and standard SVGs render visibly.

Changes

  • Added aspect-ratio: 1 / 1 and width: 100% to .CollectibleInfo__image in styles.scss.

Copilot AI review requested due to automatic review settings May 1, 2026 21:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the CollectibleInfo image container styling to prevent SVG-based NFT images (notably those using width="100%" / height="100%") from collapsing to a 0x0 rendered size in the popup UI.

Changes:

  • Add width: 100% to .CollectibleInfo__image to ensure the container has a definite inline size.
  • Add aspect-ratio: 1 / 1 to .CollectibleInfo__image so the container maintains a square height derived from its width, avoiding collapse when child SVG dimensions are percentage-based.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants