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
Fails on SVG assets without width
and height
properties
#38
Comments
@kyleolsondesign would be fixed when #36 is merged. |
Any updates on this? Would be great to get it added in. |
+1 |
1 similar comment
+1 |
#36 is merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using a tool like Adobe Illustrator to create SVG assets, you get output that does not include
width
orheight
properties. Here is a sample of that output, after being compressed with imagemin:Running through the w3c validator, this is valid SVG 1.1.
But when I run through
sizeOf
, I get the following error:If I manually add the
width
andheight
attributes,sizeOf
works as expected:The
width
andheight
attributes are described in theviewBox
attribute already, as the last two values. I suggest pulling from those values if thewidth
andheight
attributes are not present.The text was updated successfully, but these errors were encountered: