Open maroparo opened 2 years ago
Same issue with the rendering of SVGs with the popular skia framework. https://github.com/mono/SkiaSharp/issues/2220
Noticed it by updating from the older flags with the mask to the new ones with border-style. See also: https://github.com/mono/SkiaSharp/issues/2220, https://github.com/wieslawsoltes/Svg.Skia/issues/114
this renders
while this does not
@HatScripts as mentioned here https://github.com/HatScripts/circle-flags/issues/52, the issue is still happening with react native. So it is a real issue for at least three mobile development cross-platform environments. Currently Xamarin, Flutter and React-Native. The feature of circularity is significant versus other projects as https://github.com/lipis/flag-icons
Are you interested changing to the masked behaviour, in that case i can take the time and help create a PR.
@gsgou I've reverted back to using mask
instead of border-radius
as of v2.6.0 (https://github.com/HatScripts/circle-flags/commit/07324c28b709732e04c7caeee9eaa276a9b42fae), so this issue should now be fixed.
Tks a lot for this 👌
Hi, First of all thanks for this awesome lib! Much appreciated. I have installed this package as a dependency in my project. I came across this weird issue where I've notice that the the styling of the border radius doesn't always work with
border-radius:50%
. I first noticed when trying to rasterize the flags for a PDF export. The preview of the doc looked fine, but in the file itself the flag came out as as a square. I navigated to thesvg
flag file in through my editor (WebStorm) and noticed the same thing, the flags are square there as well. When opening the same file in the browser though, theborder-radius:50%
style prop was correctly interpreted and the flag showed up as round. And then it hit me! Not all programs are able to recognize/interpret the CSS like syntax. 🤔Here is a preview of what I mean, file found at
circle-flags/flags/gb.svg,
and noticeborder-radius:50%
in the code side:On the other hand, a
svg
image I found online, seems to by pass this issue in an another manner by adding some additional nativesvg
elements which helps achieving a more universal compliance:Here is a the code for the
svg
I found in the internet, maybe helps you see how they did it. ````
Sorry I couldn't be of more help but I'm not an
svg
expert myself.