0
0
mirror of https://github.com/lipis/flag-icons.git synced 2024-11-22 19:47:45 +01:00
flags/sass/_flag-icons-base.scss

31 lines
638 B
SCSS
Raw Normal View History

@use 'sass:math';
.flag-icon-background {
2015-03-02 18:23:52 +01:00
background-size: contain;
background-position: 50%;
background-repeat: no-repeat;
}
.flag-icon {
@extend .flag-icon-background;
2015-03-02 18:23:52 +01:00
position: relative;
display: inline-block;
width: math.div(4, 3) * 1em;
2015-03-02 18:23:52 +01:00
line-height: 1em;
&:before {
content: '\00a0';
}
&.flag-icon-squared {
width: 1em;
}
}
@mixin flag-icon($country) {
.flag-icon-#{$country} {
background-image: url(#{$flag-icons-path}#{$flag-icons-rect-path}/#{$country}.svg);
2015-03-02 18:23:52 +01:00
&.flag-icon-squared {
background-image: url(#{$flag-icons-path}#{$flag-icons-square-path}/#{$country}.svg);
2015-03-02 18:23:52 +01:00
}
}
}