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

Explore the need for height/width on inlined SVG's #137

Open
crgeary opened this issue Mar 19, 2017 · 0 comments
Open

Explore the need for height/width on inlined SVG's #137

crgeary opened this issue Mar 19, 2017 · 0 comments

Comments

@crgeary
Copy link
Member

crgeary commented Mar 19, 2017

I made a PR (#136) to fix issue #123 which essentially consisted of removing the height/width from the inlined SVG element. According to this CSS Tricks article on SVGs the width/height attributes are not useful for scaling inline SVGs, and instead we should set the aspect ratio with viewBox.

The 2 solutions that I can think of would be:

  1. Manually remove width & height attributes from the SVG files.
  2. Use a gulp task to remove width & height attributes on build.

The gulp inline package that we're using supports SVG transformations via options. I would guess, this is something that would help, but I'm not sure.

I see this being similar to #104 so solving one may solve the other 🤞

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

1 participant