Я импортировал шрифт из fontastic и импортировал его в проект
-assets / fontatic /
В папке темы я вставил файл fontastic.scss.Его содержание выглядит следующим образом:
@charset "UTF-8";
@font-face {
font-family: "fontastic-font";
src:url("../assets/fontastic/fontastic-font.eot");
src:url("../assets/fontastic/fontastic-font.eot?#iefix") format("embedded-opentype"),
url("../assets/fontastic/fontastic-font.woff") format("woff"),
url("../assets/fontastic/fontastic-font.ttf") format("truetype"),
url("../assets/fontastic/fontastic-font.svg#fontastic-font") format("svg");
font-weight: normal;
font-style: normal;
}
[data-icon]:before {
font-family: "fontastic-font" !important;
content: attr(data-icon);
font-style: normal !important;
font-weight: normal !important;
font-variant: normal !important;
text-transform: none !important;
speak: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
[class^="icon-"]:before,
[class*=" icon-"]:before {
font-family: "fontastic-font" !important;
font-style: normal !important;
font-weight: normal !important;
font-variant: normal !important;
text-transform: none !important;
speak: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@mixin makeIcon($arg, $val) {
.ft-#{$arg}:before ,
.ion-ios-ft-#{$arg}:before ,
.ion-ios-ft-#{$arg}-outline:before ,
.ion-md-ft-#{$arg}:before ,
.ion-md-ft-#{$arg}-outline:before {
content: $val;
font-size: 26px;
}
}
@include makeIcon(pair-diamond, '\61');
@include makeIcon(revised-list, '\62');
@include makeIcon(new-arrival, '\63');
Но как только я добавляю ссылку в файл app.scss, ионный значок ломается.Также в variable.scss я переименован из @import "ionic.ionicons";@import "ionicons";
Все еще не работает.