flag-icon-css
Version:
> A curated collection of all country flags in SVG — plus the CSS for easier integration. See the [demo](https://flagicons.lipis.dev).
29 lines (26 loc) • 601 B
text/less
.flag-icon-background {
background-size: contain;
background-position: 50%;
background-repeat: no-repeat;
}
.flag-icon {
.flag-icon-background;
position: relative;
display: inline-block;
width: unit((4 / 3), em);
line-height: 1em;
&:before {
content: '\00a0';
}
&.flag-icon-squared {
width: 1em;
}
}
.flag-icon(@country) {
.flag-icon-@{country} {
background-image: ~'url(@{flag-icons-path}@{flag-icons-rect-path}/@{country}.svg)';
&.flag-icon-squared {
background-image: ~'url(@{flag-icons-path}@{flag-icons-square-path}/@{country}.svg)';
}
}
}