Skip to content

Commit 02f0cb6

Browse files
committed
Delete the icon fonts and create icon by pure CSS to reduce size of plugin
1 parent 237734e commit 02f0cb6

File tree

5 files changed

+20
-60
lines changed

5 files changed

+20
-60
lines changed

src/assets/vue-infinite-loading.eot

-5.47 KB
Binary file not shown.

src/assets/vue-infinite-loading.svg

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/assets/vue-infinite-loading.ttf

-5.13 KB
Binary file not shown.

src/assets/vue-infinite-loading.woff

-3.14 KB
Binary file not shown.

src/components/InfiniteLoading.vue

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -108,35 +108,36 @@
108108
};
109109
</script>
110110
<style lang="less" scoped>
111-
@font-face{
112-
font-family: "vue-infinite-loading";
113-
src: url('../assets/vue-infinite-loading.eot?t=1462930749'); /* IE9*/
114-
src: url('../assets/vue-infinite-loading.woff?t=1462930749') format('woff'), /* chrome, firefox */
115-
url('../assets/vue-infinite-loading.ttf?t=1462930749') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
116-
url('../assets/vue-infinite-loading.svg?t=1462930749#vue-infinite-loading') format('svg'); /* iOS 4.1- */
117-
}
118-
119-
.icon-loading:before{
120-
content: "\e600";
121-
font-family: "vue-infinite-loading" !important;
122-
font-style: normal;
123-
-webkit-font-smoothing: antialiased;
124-
-webkit-text-stroke-width: 0.2px;
125-
-moz-osx-font-smoothing: grayscale;
111+
.icon-loading{
112+
position: relative;
113+
border: 1px solid #999;
114+
&:before{
115+
@size: 6px;
116+
content: '';
117+
position: absolute;
118+
display: block;
119+
top: 0;
120+
left: 50%;
121+
margin-top: -@size/2;
122+
margin-left: -@size/2;
123+
width: @size;
124+
height: @size;
125+
background-color: #999;
126+
border-radius: 50%;
127+
}
126128
}
127129
128130
.infinite-loading-container{
129131
clear: both;
130132
text-align: center;
131133
*[class^=icon-]{
132-
@size: 30px;
134+
@size: 28px;
133135
display: inline-block;
134136
margin: 15px 0;
135137
width: @size;
136138
height: @size;
137139
font-size: @size;
138140
line-height: @size;
139-
color: #999;
140141
border-radius: 50%;
141142
animation: ease loading 1.5s infinite;
142143
}
@@ -151,10 +152,10 @@
151152
152153
@keyframes loading{
153154
0%{
154-
transform: rotate(-38deg);
155+
transform: rotate(0);
155156
}
156157
100%{
157-
transform: rotate(322deg);
158+
transform: rotate(360deg);
158159
}
159160
}
160161
</style>

0 commit comments

Comments
 (0)