Skip to content

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

Open
Meghpal wants to merge 1 commit into
seekshiva:masterfrom
Meghpal:master
Open

Fix for resizing SVGs which don't have viewBox#46
Meghpal wants to merge 1 commit into
seekshiva:masterfrom
Meghpal:master

Conversation

@Meghpal

@Meghpal Meghpal commented Jun 21, 2019

Copy link
Copy Markdown

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.

1 participant