【问题标题】:_Class.scss: Undefined variable "$font-family" in Sencha Touch theme_Class.scss:Sencha Touch 主题中未定义的变量“$font-family”
【发布时间】:2013-08-06 15:53:49
【问题描述】:

我正在尝试向我的应用程序添加一个新的自定义主题,但是当我在 Compass 上编译时它会引发以下错误:

_Class.scss:未定义变量:“$font-family”

我尝试将_Class.scss 中的html,body 字体更改为$font-family,但它不起作用。我的 Sencha Touch 版本是 2.2.1。我该如何解决这个问题?

// Let's start with the basics
$base - color: #CC0000;
$active - color: #850000;

// Buttons
$button-gradient: 'bevel';

// Lists
$list-bg-color: # eee;
$list - color: #333;
$list-pressed-color: # ddd;
$list - active - gradient: 'recessed';
$list - header - bg - color: #990000;
$list-header:white;
$list-header-gradient: 'bevel';

// Tabs
$tabs_dark_color: #000;

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

@include sencha-panel;
@include sencha-buttons;
@include sencha-sheet;
@include sencha-picker;

@include sencha-msgbox;
@include sencha-loading-spinner;

@include sencha-button-ui('action', #ffc801);
@include sencha-button-ui('decline', desaturate(darken(#b8a7a7, 10%), 5%));

.x-tabbar-dark .x-tab {
    color: white;
}
.x-list-header {
    color: white !important;
}
.x-list-round .x-list-header {
    color: #777 !important;
}
.x-tabbar-dark.x-docked-bottom .x-tab .x-button-icon {
    background: white !important;
}

【问题讨论】:

标签: sencha-touch sencha-touch-2 themes sass sencha-touch-2.1


【解决方案1】:

这是一个相当老的帖子,但为了完整起见。我昨天遇到了这个问题。这是因为您没有导入默认主题变量。

你确实导入了 sencha-touch/default/all 但这些不是变量。变量驻留在sencha-touch/default

@import 'sencha-touch/default'; 应该可以解决问题。

【讨论】:

    【解决方案2】:

    在您放置config.rb的位置创建名为样式表的文件夹

    我已经创建了放置config.rb文件的文件夹样式

    将文件夹字体从touch\resources\themes\fonts 复制到styles/stylesheets/ 文件夹

    【讨论】:

      猜你喜欢
      • 2013-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-15
      • 1970-01-01
      • 1970-01-01
      • 2022-12-10
      • 2014-02-07
      相关资源
      最近更新 更多