Forked from lipis/flag-icon-css

flags A collection of all country flags in SVG — plus the CSS for easier integration


Language: HTML


npm version Bower version

A collection of all country flags in SVG — plus the CSS for easier integration. See the demo.


For using the flags inline with text add the classes .flag-icon and .flag-icon-xx (where xx is the ISO 3166-1-alpha-2 code of a country) to an empty <span>. If you want to have a squared version flag then add the class flag-icon-squared as well. Example:

<span class="flag-icon flag-icon-gr"></span>
<span class="flag-icon flag-icon-gr flag-icon-squared"></span>

You could also apply this to any element, but in that case you'll have to use the flag-icon-background instead of flag-icon and you're set. This will add the correct background with the following CSS properties:

background-size: contain;
background-position: 50%;
background-repeat: no-repeat;

Which means that the flag is just going to appear in the middle of an element, so you will have to set manually the correct size of 4 by 3 ratio or if it's squared add also the flag-icon-squared class.


Run the npm install to install the dependencies after cloning the project and you'll be able to:

To watch for changes and live reload if served

$ grunt

To build *.less files

$ grunt build

To serve it on localhost:8000

$ grunt connect

To have only specific countries in the css file, remove the ones that you don't need from the flag-icon-list.less file and build it again.


This project wouldn't exist without the awesome and now deleted collection of SVG flags by koppi.

Project Statistics

Sourcerank 0
Repository Size 18.3 MB
Stars 1
Forks 0
Watchers 1
Open issues disabled
Dependencies 0
Contributors 17
Tags 28
Last updated
Last pushed

Top Contributors See all

Lipis Greenkeeper mdxs bcaller Marke David Ollerhead Christian Bartels Oleksii Markhovskyi Alex Popov Tim Huff Andreas Lemke Greg Bowler Martin Lindhe Chris Topaloudis Paddy O'Reilly Barry Mieny Tiago Porto

Recent Tags See all

2.0.0 April 12, 2016
1.4.0 March 06, 2016
1.3.0 February 25, 2016
1.2.0 February 13, 2016
1.1.0 January 22, 2016
1.0.0 December 25, 2015
0.8.6 December 23, 2015
0.8.5 November 15, 2015
0.8.4 October 27, 2015
0.8.3 October 26, 2015
0.8.2 September 05, 2015
0.8.1 September 05, 2015
v0.8.1 September 05, 2015
0.8.0 September 04, 2015
0.7.1 March 26, 2015

Something wrong with this page? Make a suggestion

Last synced: 2016-05-13 05:45:36 UTC

Login to resync this repository