mirror of
https://github.com/lipis/flag-icons.git
synced 2026-04-26 09:25:50 +03:00
[PR #275] [MERGED] Add viewBox tag to flags with no viewBox #727
Labels
No labels
3rd-party
3rd-party
bug
code
documentation
enhancement
fixed-in-master
flag-request
help needed
missing-flag
missing-flag
pull-request
wrong-flag
wrong-flag
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flag-icons#727
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lipis/flag-icons/pull/275
Author: @edorivai
Created: 8/10/2016
Status: ✅ Merged
Merged: 8/14/2016
Merged by: @lipis
Base:
master← Head:master📝 Commits (1)
240292aAdd viewBox tag to flags with no viewBox📊 Changes
473 files changed (+473 additions, -473 deletions)
View changed files
📝
flags/1x1/ad.svg(+1 -1)📝
flags/1x1/ae.svg(+1 -1)📝
flags/1x1/af.svg(+1 -1)📝
flags/1x1/ag.svg(+1 -1)📝
flags/1x1/ai.svg(+1 -1)📝
flags/1x1/al.svg(+1 -1)📝
flags/1x1/ao.svg(+1 -1)📝
flags/1x1/aq.svg(+1 -1)📝
flags/1x1/ar.svg(+1 -1)📝
flags/1x1/as.svg(+1 -1)📝
flags/1x1/at.svg(+1 -1)📝
flags/1x1/au.svg(+1 -1)📝
flags/1x1/aw.svg(+1 -1)📝
flags/1x1/ax.svg(+1 -1)📝
flags/1x1/az.svg(+1 -1)📝
flags/1x1/bb.svg(+1 -1)📝
flags/1x1/bd.svg(+1 -1)📝
flags/1x1/be.svg(+1 -1)📝
flags/1x1/bf.svg(+1 -1)📝
flags/1x1/bg.svg(+1 -1)...and 80 more files
📄 Description
Hey, great stuff!
We needed to have the viewBox set, and found that not all flags have that. So we wrote a simple (read: dumb) little script that adds the viewBox to those SVG's that didn't have any yet. To be sure we wrote it very defensively, so it doesn't change the file if:
viewBoxattribute present, ORDespite these limitations, the script still works pretty well, we managed to add the viewBox to 473 files.
Here's the script's output, showing which files it was unable to update:
As you see, quite a few of the flags already had a viewBox set. We were not sure whether these were all correct. For instance
4x3/am.svgshows:height="480" width="640" viewBox="0 0 0.5160635 3.096381". We know too little of SVG's to say whether this works as expected.Funnily,
1x1/py.svghas dimensions of513x512. Typo?Finally, you can check the script yourself in https://github.com/dsempel/flag-icon-css/tree/viewbox
to get our dev dependencies, and
to run the script.
Let us know what you think!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.