mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Replaced the existing PNG flag icons with the flag-icon-css library that uses SVGs, has more flags, and is more active (i.e well maintained). Credit to @mariavilaro & @w20k. Thanks to @petehalverson for Octodock for easy testing of this.
47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
//
|
|
// Dependencies
|
|
// --------------------------------------------------
|
|
@import "../vendor/flag-icon/less/variables";
|
|
|
|
//
|
|
// Overriding path variable
|
|
// --------------------------------------------------
|
|
|
|
@flag-icon-css-path: 'vendor/flag-icon/flags';
|
|
|
|
//
|
|
// Flag
|
|
// --------------------------------------------------
|
|
|
|
[class^="flag-"],
|
|
[class*=" flag-"] {
|
|
background-size: contain;
|
|
background-position: 50%;
|
|
background-repeat: no-repeat;
|
|
position: relative;
|
|
display: inline-block;
|
|
width: unit((4 / 3), em);
|
|
line-height: 1em;
|
|
&:before {
|
|
content: "\00a0";
|
|
}
|
|
&.oc-flag-squared {
|
|
width: 1em;
|
|
}
|
|
}
|
|
|
|
.flag-icon(@country) {
|
|
.flag-@{country} {
|
|
background-image: ~"url(@{flag-icon-css-path}@{flag-icon-rect-path}/@{country}.svg)";
|
|
&.oc-flag-squared {
|
|
background-image: ~"url(@{flag-icon-css-path}@{flag-icon-square-path}/@{country}.svg)";
|
|
}
|
|
}
|
|
}
|
|
|
|
//
|
|
// Generate all flags
|
|
// --------------------------------------------------
|
|
|
|
@import "../vendor/flag-icon/less/flag-icon-list";
|
|
@import "../vendor/flag-icon/less/flag-icon-more"; |