_flag-icon-base.scss 616 B

12345678910111213141516171819202122232425262728
  1. .flag-icon-background {
  2. background-size: contain;
  3. background-position: 50%;
  4. background-repeat: no-repeat;
  5. }
  6. .flag-icon {
  7. @extend .flag-icon-background;
  8. position: relative;
  9. display: inline-block;
  10. width: (4 / 3) * 1em;
  11. line-height: 1em;
  12. &:before {
  13. content: '\00a0';
  14. }
  15. &.flag-icon-squared {
  16. width: 1em;
  17. }
  18. }
  19. @mixin flag-icon($country) {
  20. .flag-icon-#{$country} {
  21. background-image: url(#{$flag-icon-css-path}#{$flag-icon-rect-path}/#{$country}.svg);
  22. &.flag-icon-squared {
  23. background-image: url(#{$flag-icon-css-path}#{$flag-icon-square-path}/#{$country}.svg);
  24. }
  25. }
  26. }