Sencha主题定制问题

时间:2013-09-13 07:40:03

标签: extjs rubygems sencha-touch-2 sass compass-sass

我开始学习sencha touch 2.2.1。我在为我的应用程序创建自定义SASS文件(或创建自定义主题文件)时遇到问题。我在resources / sass目录中创建了一个custom.scss文件。在custom.scss文件中,我粘贴了这个mixin:

@include sencha-toolbar-ui('sub', #58710D, 'glossy');

并在app.scss中导入我的custom.scss文件,然后我运行了一个终端命令:指南针编译'resources / sass',但它引发了一个错误:

C:\AppServ\www\gs\resources>compass compile
error sass/app.scss (Line 5: File to import not found or unreadable: sencha-  touch/default.
 Load paths:

    C:/AppServ/www/gs/resources/sass
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.2/frameworks/blueprint/stylesheets
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.2/frameworks/compass/stylesheets
                      Compass::SpriteImporter)
                      identical stylesheets/app.css
                      error sass/custom.scss (Line 1: Undefined mixin 'sencha-toolbar-ui'.)
                      overwrite stylesheets/custom.css

另外,我想问另一件事,我查看了很多应用程序定制的sass文件。但我无法理解一个共同点。在app.scss中,我多次看到这段代码。我猜他们是mixins但是当我在app.scss中复制/粘贴它们时,我得到一个错误说:undefined @mixins sencha-panel。

 @include sencha-panel;   
 @include sencha-buttons;
 @include sencha-sheet;
 @include sencha-picker;
 @include sencha-tabs;
 @include sencha-toolbar;
 @include sencha-toolbar-forms;
 @include sencha-indexbar;
 @include sencha-list;
 @include sencha-layout;
 @include sencha-carousel;
 @include sencha-form;
 @include sencha-msgbox;

请帮助我,如果你能分享关于如何在sencha中创建我自己的sass文件的任何链接,那么我将非常感谢你。

1 个答案:

答案 0 :(得分:0)

从ST 2.0开始,你不再使用“@include sencha-panel ...”了。你必须使用“@import ......”。请参阅文档:http://docs.sencha.com/touch/2.2.0/#!/guide/theming