danalloway / react-country-flag

React component for emoji/svg country flags.
https://danalloway.github.io/react-country-flag/
MIT License
248 stars 43 forks source link

Swiss (SVG) flag has wrong aspect ratio #43

Closed N3XT191 closed 2 years ago

N3XT191 commented 3 years ago

The flag of Switzerland displays a white cross in the centre of a square red field. The white cross is known as the Swiss cross. Its arms are equilateral, and their ratio of length to width is 7:6. The size of the cross in relation to the field was set in 2017 as 5:8.

https://en.m.wikipedia.org/wiki/Flag_of_Switzerland

the SVG for the Swiss flag in this package is wrong (3:2 probably?) but it should be square (1:1)

N3XT191 commented 3 years ago

To clarify, there exists a 3:2 flag, but that is only used on boats, ships and some other minor places. The flag flown by the Gouvernement and all the people who know what they are doing is square

danalloway commented 2 years ago

the flags come from another library, this library is just the React component that renders them see here for the actual flag library https://github.com/lipis/flag-icons

if you would like to use the square versions of all flags, pass in the cdnUrl override and use the 1x1 provided by the flag library referenced above

<ReactCountryFlag countryCode="CH" cdnUrl="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/4.1.4/flags/1x1/" />