Scalable Pure-CSS Flags

A collection of flags rendered solely through CSS shapes, clip-paths backgrounds. All flags here are scalable by adjusting either the width or the height of the root element (maintaining the correct aspect ratios). Some flags are available in multiple aspect ratios. All of the country flags are highly accurate to the colours and measurements of their construction flags found through various online sources.

Not all the flags will render accurately due to the slight differences in browsers' rendering methods and rounding errors. Where possible, fractional measurements are calculated in real-time using the CSS calc() function for the most accurate results. In the rare case where this was not possible, some measurements were rounded to 3dp. Some flags feature highly complex seals or coats of arms, in these cases I have resorted to using SVGs embeded in data URLs. As such, I have indicated underneath each flag the percentage of the ratio of CSS to SVG. In most cases, the flag was created purely using CSS.

The primary sources I have used are available at the bottom of the page.


Flags of Africa

Burkina Faso

Benin

Botswana

Democratic Republic of the Congo

    Central African Republic

    Republic of the Congo

    Côte d'Ivoire

    Cameroon

      Cabo Verde

      Djibouti

      Ethiopia

      Gabon

      Ghana

      The Gambia

      Guinea

      Guinea-Bissau

      Comoros

      Liberia

      Libya

      Morocco

      Madagascar

      Mali

      Mauritania

      Mauritius

      Namibia

      Niger

      Nigeria

      Rwanda

      Seychelles

      Sudan

      Sierra Leone

      Senegal

      Somalia

      South Sudan

      Sao Tome and Principe

      Chad

      Togo

      Tunisia

      Tanzania

      South Africa


      Flags of The Americas

      Antigua and Barbuda

      Barbados

      Bahamas

      Canada

      Chile

      Colombia

      Costa Rica

      Cuba

      Guyana

      Honduras

      Jamaica

      Saint Lucia

      Panama

      Peru

      Suriname

      Trinidad and Tobago

      Saint Vincent and the Grenadines


      Flags of Asia

      United Arab Emirates

      Armenia

      Azerbaijan

      Bangladesh

      Bahrain

      People's Republic of China

      Indonesia

      Israel

      Jordan

      Japan

      North Korea

      Kuwait

      Laos

      Myanmar

      Maldives

      Pakistan

      State of Palestine

      Qatar

      Singapore

      Syria

      Thailand

      Timor-Leste

      Republic of Türkiye (Turkey)

      Republic of China (Taiwan)

      Uzbekistan

      Vietnam

      Yemen


      Flags of Europe

      Albania

      Austria

      Bosnia and Herzegovina

      Belgium

      Bulgaria

      Switzerland

      Czech Republic

      Germany

      Denmark

      Estonia

      Finland

      France

        The United Kingdom

        Georgia

        Greece

        Hungary

        Ireland

        Iceland

        Italy

        Lithuania

        Luxembourg

        Latvia

        Monaco

        North Macedonia

        Kingdom of the Netherlands

        Norway

        Poland

        Romania

        Russian Federation

        Sweden

        Ukraine


        Flags of Oceania

        Federated States of Micronesia

        Marshall Islands

        Nauru

        Palau

        Solomon Islands

        Tonga

        Samoa


        LGBTQ+ Pride Flags

        Progressive Pride Flag

          Rainbow Flag

            Straight Ally

              Lesbian

                Gay Men

                  Bisexual

                    Transgender

                      Pansexual

                        Asexual

                          Non-Binary

                            Intersex

                              Aromantic

                                Genderfluid

                                  Agender

                                  Bear Brotherhood

                                    Abrosexual

                                    Demisexual

                                      Gray Asexual / Graysexual

                                        Omnisexual

                                          Polysexual

                                            Aromantic Asexual (Aroace)

                                            Demiromantic

                                            Polyamory

                                              Bigender

                                                Demigender

                                                  Demiboy

                                                    Demigirl

                                                      Genderqueer

                                                        Pangender


                                                        Sources

                                                        Various online sources were used for the colours and measurements of each flag; the country flags sourced from construction sheets. A large amount of my own math was also used, including fractional math, algebra, and trigonometry to convert the sourced measurements into percentages and numbers that would work with CSS.