Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2598] Problematic SVG on Firefox #2623

Merged
merged 2 commits into from
Sep 22, 2024

Conversation

Changh341
Copy link
Contributor

@Changh341 Changh341 commented Sep 22, 2024

This fixes issue #2598

My wallet address is 0x959E79438e522308587C3687d06bC3A467820119

Issue explanation:
The SVG syntax for width and height were defined in a style attribute in SVG markup. Firefox doesn't seem to read that and loaded the SVG as 0 x 0.

Actions taken:
I instead used the attributes: 'height' and 'width' to define the size which fixed the icon not appearing.
I went ahead and deleted the PNG dupe and moved the SVG into the autoloader.
Slight change to the size of the icon on the SVG markup from 512 x 512 to 128 x 128 because 512 leaked outside the frame.
I scaled down the icon appearing above the creatures.

Preview from Firefox:
image

Copy link

vercel bot commented Sep 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ancientbeast ✅ Ready (Inspect) Visit Preview Sep 22, 2024 8:56pm

@Changh341 Changh341 changed the title Correct markup for firefox compatibility. Remove duplication of skip. [#2598] Problematic SVG on Firefox Sep 22, 2024
@Changh341
Copy link
Contributor Author

Let me know if changing the icon size on the SVG level is not ok. I will revert and look into doing at a code level.

@DreadKnight
Copy link
Member

@Changh341 I've tested, works well, looks good, same for code, but yeah, ideally the svg shouldn't be manually edited at all and have things done via code.

@Changh341
Copy link
Contributor Author

Changh341 commented Sep 22, 2024

@DreadKnight Got it. I went ahead and scaled down the icon at the phaser level in creature.ts and reverted the sizing on the SVG.

@DreadKnight DreadKnight linked an issue Sep 22, 2024 that may be closed by this pull request
@DreadKnight DreadKnight marked this pull request as ready for review September 22, 2024 21:36
@DreadKnight DreadKnight merged commit 8a2d9de into FreezingMoon:master Sep 22, 2024
2 checks passed
@DreadKnight
Copy link
Member

DreadKnight commented Sep 22, 2024

@Changh341 Well done! Merged and bounty sent with bonus -> https://www.mintme.com/explorer/tx/0x4e783f210835cf7f97e258b14115cb977da66ea3d0b85caa5fed1c1806de139a 🪙

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.

some svgs problematic in Firefox [bounty: 4 XTR]
2 participants