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

Use viewBox instead of width, height, x and y #16

Open
anehx opened this issue Nov 24, 2016 · 3 comments
Open

Use viewBox instead of width, height, x and y #16

anehx opened this issue Nov 24, 2016 · 3 comments

Comments

@anehx
Copy link

anehx commented Nov 24, 2016

I noticed that the generated SVG file is using static width, height, x and y.

Consider using viewBox="0 0 48 48" instead, since this makes the svg reusable for other icon generators such as splicon which is what I'm using..

@Maddoc42
Copy link
Owner

Cool, thanks for the tip! 👍

To clarify, judging from this article, the created SVG files are setting the viewPort via width and height, but are missing a viewBox. So the fix here would be to include both, width + height and a viewBox, correct?

@anehx
Copy link
Author

anehx commented Nov 25, 2016

If you set a correct viewBox you don't have to set width and height too, since it will take the initial size from the viewBox.

By the way, very nice generator! Good job!

@Maddoc42
Copy link
Owner

All right, really thanks! 👍 👍

This should be a simple enough fix. Maybe paper.js has native support for this, otherwise it requires digging through the created SVG file. I'll leave this open for a bit until the holidays if anyone is interested 🎅

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

No branches or pull requests

2 participants