我想向我的sencha建筑师项目添加自定义字体图标,并删除不必要的主题类,但似乎Sencha建筑师根本不使用app.scss(位于我的项目的资源/ sass文件夹)。我所做的更改既不适用于架构师,也不适用于我启动应用程序。Sencha建筑师3不使用app.css
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和它编译就好了。
请问有人能详细说明吗?
我使用:
- 煎茶建筑师3.0.2.1375
- CMD:4.0.2.67
- 框架:煎茶触摸 2.3.x版本
UPDATE:
事实证明,由于主题原因,Architect不使用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资源)并添加了上述代码。
谢谢你与我分享。它帮助我解决了我的问题。 – Bram
也可以删除'自动'sencha/default/all导入,而是使用这里描述的技术:http://www.sencha.com/blog/4-tricks-for-smaller-css-in- touch-22 – Bram
似乎这可以通过编辑scss文件来实现。尽管我们可能应该这样做,但我们并没有采取自动化的方式。 –