2

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

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

并在 app.scss 中导入我的 custom.scss 文件,然后我运行了一个终端命令: compass compile for '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 文件的任何链接,那么我将不胜感激。

4

1 回答 1

0

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

于 2013-10-18T13:43:10.550 回答