Sencha Architect 3不使用app.css [英] Sencha Architect 3 does not use app.css

查看:124
本文介绍了Sencha Architect 3不使用app.css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图向我的sencha architect项目添加自定义字体图标,并删除不必要的主题类,但是Sencha Architect似乎根本不使用app.scss(位于我项目的resources/sass文件夹中).我所做的更改既不会应用到架构师中,也不会在我启动应用程序时应用.

I am trying to add custom font icons to my sencha architect project, and remove unnecessary theme classes but it seems that Sencha Architect does not use the app.scss at all (located in the resources/sass folder of my project). The changes that I made are neither applied in architect nor when I start the app.

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,并且可以正常编译.

Just to mention, I did compile the scss file to css and it compiles just fine.

有人可以详细说明吗?

我正在使用:

  • Sencha Architect 3.0.2.1375
  • Cmd:4.0.2.67
  • 框架:Sencha Touch 2.3.x
  • Sencha Architect 3.0.2.1375
  • Cmd: 4.0.2.67
  • Framework: Sencha Touch 2.3.x

更新:

事实证明,出于主题原因,Architect不使用app.scss文件(请参阅Phill的文章).当我尝试插入图标字体时,确实出现了另一个问题.找不到字体文件.以下帖子中提到了原因: http://www.sencha.com/forum/showthread.php?280895-How-to-correct-the-Font-theming-in-Architect3

It turns out that Architect does not use the app.scss file for theming reasons (see Phill's post). When I tried to insert the icon-font another problem did arise. The font-files could not be found. The reason is mentioned in the following post: http://www.sencha.com/forum/showthread.php?280895-How-to-correct-the-Font-theming-in-Architect3

以下代码解决了该问题,现在我可以很高兴地使用新的图标字体:

The following code resolved the issue and I can happily use my new icon-font now:

$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资源)的主题中添加了一个文件,并添加了上述代码.

To be explicit. I added a file to the theme in Architect (a scss resource) and added the aforementioned code.

推荐答案

Architect会忽略此文件,因为我们为您提供了完整的主题支持.如果要添加自定义scs,请单击资源下的主题.在配置面板中,您将看到一个scss配置.单击(+)图标以添加scss资源.

Architect ignores this file as we give you full theme support. If you want to add custom scss click on the theme under resources. In the config panel you'll see a scss config; click the (+) icon to add a scss resource.

现在通过单击旁边的(->)按钮或在主题下的检查器中选择它来选择它.切换到代码视图并粘贴到您的scss中.

Now select it by either clicking the (->) button next to it or selecting it in the inspector under your theme. Switch to code view and paste in your scss.

这篇关于Sencha Architect 3不使用app.css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆