Skip to content

Commit

Permalink
Merge pull request #8 from P3trur0/issue-7
Browse files Browse the repository at this point in the history
flag resizing fixes for IE
  • Loading branch information
p3trur0 authored Apr 15, 2019
2 parents f9f49f1 + 2c18098 commit f73a995
Show file tree
Hide file tree
Showing 3 changed files with 777 additions and 605 deletions.
29 changes: 13 additions & 16 deletions CountryFlag.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<span :class="flagIconClass" :style="flagStyle" v-if="country"></span>
<span :class="flagIconClass" v-if="country"></span>
</template>

<script>
Expand Down Expand Up @@ -33,21 +33,6 @@ export default {
flagIconCountry () {
return `flag-${this.country.toLowerCase()}`
},
flagWidth () {
switch (this.size) {
case 'small':
return '16'
case 'normal':
return '32'
case 'big':
return '64'
default:
return '32'
}
},
flagStyle () {
return `transform: scale(calc(${this.flagWidth} / 64));`
},
flagMargin () {
switch (this.size) {
case 'small':
Expand All @@ -67,13 +52,25 @@ export default {
.small-flag {
margin-left: -24px;
margin-right: -24px;
transform: scale(0.25);
-ms-transform: scale(0.25);
-webkit-transform: scale(0.25);
-moz-transform: scale(0.25);
}
.normal-flag {
margin-left: -16px;
margin-right: -16px;
transform: scale(0.5);
-ms-transform: scale(0.5);
-webkit-transform: scale(0.5);
-moz-transform: scale(0.5);
}
.big-flag {
margin-right: 0;
margin-left: 0;
transform: scale(1);
-ms-transform: scale(1);
-webkit-transform: scale(1);
-moz-transform: scale(1);
}
</style>
Loading

0 comments on commit f73a995

Please sign in to comment.