Yummygum / flagpack-core

Flagpack contains 250+ flag icons to easily use within your code project.
https://flagpack.xyz
MIT License
576 stars 131 forks source link

Some flags have `rx="-1"` (negative border radius) which causes a crash in `react-native-svg` and some other renderers #73

Open SimpleCreations opened 2 years ago

SimpleCreations commented 2 years ago

Some flags, such as this one https://github.com/Yummygum/flagpack-core/blob/main/lib/flags/s/DEU.svg

have rx="-1" declared on a <rect> element, which causes a crash in react-native-svg.

Here is the list of flags in the s directory that have this:

./008.svg
./276.svg
./466.svg
./496.svg
./540.svg
./584.svg
./659.svg
./728.svg
./800.svg
./AL.svg
./ALB.svg
./DE.svg
./DEU.svg
./KN.svg
./KNA.svg
./MH.svg
./MHL.svg
./ML.svg
./MLI.svg
./MN.svg
./MNG.svg
./NC.svg
./NCL.svg
./SS.svg
./SSD.svg
./UG.svg
./UGA.svg

Please check all that apply

Possible Solution

Remove rx="-1" as it does not serve any purpose anyway.

CramericaIndustries commented 1 year ago

rx="-1" is an invalid value according to the svg spec

A negative value for rx is invalid and must be ignored.

https://svgwg.org/svg2-draft/geometry.html#RX