将默认蓝色主题更改为绿色 [英] Changing default blue theme to green

查看:27
本文介绍了将默认蓝色主题更改为绿色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望将Sencha Touch应用程序的默认蓝色更改为绿色。我遵循的步骤如下:

  1. gem update --system

  2. gem install compass

  3. compass create myfile

  4. 复制了.scss文件并将其粘贴到touch-2.2.1/resources/sqss/目录中。

  5. 将以下代码粘贴到该文件中并将其命名为happy.css

    $base-color: #709e3f;
    @import 'sencha-touch/default/all';
    @include sencha-panel;
    @include sencha-buttons;
    @include sencha-sheet;
    @include sencha-tabs;
    @include sencha-toolbar;
    @include sencha-list;
    @include sencha-layout;
    @include sencha-loading-spinner;
    
  6. compass compile happy.scss

  7. 已替换app.html页中的名称happy.scss

  8. 运行应用程序,我收到以下错误:

    语法错误:第2行的未定义变量:"$FONT-FAMILY".a /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/src/_Class.scssa 从第1行开始 /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/src/_all.scssa 从第1行开始 /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/_all.scssa 从第3行开始 /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/sass/happy.scssaa 1: /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/sass/happy.scss

我如何解决此问题?

推荐答案

添加以下行

@import 'sencha-touch/default';

在此行之前

@import 'sencha-touch/default/all';

还根据文档

There are a lot of changes from Sencha Touch 2.1 to 2.2,

The most important change to be aware of is the move away from using mixins 
for each component

We found that using mixins for each component was quite slow when compiling your Sass, 
so we decided to simply move to using @import to just include each component.

在Touch 2.1中,样式表如下所示:

@import 'sencha-touch/default/all';

@include sencha-panel;
@include sencha-buttons;
// and other components…

在Touch 2.2中,它如下所示:

@import 'sencha-touch/default';

@import 'sencha-touch/default/Panel';
@import 'sencha-touch/default/Button';
// and other components

这篇关于将默认蓝色主题更改为绿色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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