我正在尝试为我的sencha architect项目添加自定义字体图标,并删除不必要的主题类,但是似乎Sencha Architect根本不使用app.scss (位于我的项目的资源/sass文件夹中)。我所做的改变既没有应用于架构师,也没有应用于我启动应用程序的时候。
app.scss
$include-pictos-font:
false; $include-default-icons: false;
@import 'sencha-touch/default';
@import'sencha-touch/default/src/Class';
@include icon-font('CustomFont', inline-font-files(
'customFont/customFont.woff', woff, 'customFont/customFont.ttf',
truetype, 'customFont/customFont.svg', svg ));
@include icon("map" , "e600", "CustomFont"); @include
icon("check_filled", "e602", "CustomFont");
值得一提的是,我确实将scss文件编译成css,它编译得很好。
有人能详细解释一下吗?
我正在使用:
更新:
事实证明,架构师不使用app.scss文件是出于主题的原因(参见Phill的文章)。当我试图插入图标字体时,出现了另一个问题。无法找到字体文件。原因在以下文章中提到:http://www.sencha.com/forum/showthread.php?280895-How-to-correct-the-Font-theming-in-Architect3
下面的代码解决了这个问题,现在我可以很高兴地使用我的新图标字体了:
$font-files:
url('../resources/sass/stylesheets/fonts/bla/bla.woff') format("woff"),
url('../resources/sass/stylesheets/fonts/bla/bla.ttf') format("truetype"),
url('../resources/sass/stylesheets/fonts/bla/bla.svg') format("svg");
@include icon-font('IcoMoon', $font-files);
@include icon("map" , "\e600", "IcoMoon");
@include icon("check_filled", "\e602", "IcoMoon");
直截了当。我在Architect ( scss资源)中向主题添加了一个文件,并添加了上述代码。
发布于 2014-02-07 18:08:44
架构师忽略了这个文件,因为我们为您提供了完整的主题支持。如果要添加自定义scss,请单击“资源”下的主题。在配置面板中,您将看到scss配置;单击(+)图标添加scss资源。
现在,通过单击它旁边的(->)按钮或在主题下的检查器中选择它来选择它。切换到代码视图并粘贴到scss中。
https://stackoverflow.com/questions/21606558
复制相似问题