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

Fix for resizing SVGs which don't have viewBox #46

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

Conversation

Meghpal
Copy link

@Meghpal Meghpal commented Jun 21, 2019

Potential fix for issue #3

As I understood, the SVGs that do not have viewBox cause the image clipping problem. If we add a viewBox that is the same height and width as the SVG, it is possible to resize it with styles. (Assumption: No viewBox must mean the <svg> tag should be having a height and width)

Tested with:

  1. API: https://restcountries.eu SVG flags
  2. The SVG in the aforementioned issue.

Can you please review the fix and see if it's worth anything?

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.

None yet

1 participant