10000 Ensure unitless width/height in SVG still works by d4rky-pl · Pull Request #1 · xeeo/svg2pngs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ensure unitless width/height in SVG still works #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

d4rky-pl
Copy link
@d4rky-pl d4rky-pl commented May 3, 2023

The width and height attributes in svg tag can be unitless (e.g. width="100" instead of width="100px"). This is a completely valid SVG file but this tool fails because it expects the px suffix.

This PR ensures the suffix remains optional while at the same time guarding against unparseable units (like 100% or 10em)

Thank you for this tool BTW, I've been using it for years now ❤️

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.

1 participant
0