【问题标题】:Sencha build - app.scss crashesSencha build - app.scss 崩溃
【发布时间】:2013-06-02 22:32:21
【问题描述】:

我尝试过这个例子:

http://extdesenv.com/theming/adding-custom-font-icons-to-sencha-touch-2-2/

其中解释了如何设置您的应用以使用 iconmoon 字体。

确实有他们解释过,但没有奏效。我远不擅长 Ruby、css 或 scss,所以这可能是一个愚蠢的错误。

这是错误报告:

这是我的 config.rb 文件:

# Get the directory that this configuration file exists in
dir = File.dirname(__FILE__)

# Load the sencha-touch framework automatically.
load File.join(dir, '..', '..', 'touch', 'resources', 'themes')

# Compass configurations
sass_path = dir
css_path = File.join(dir, "..", "css")
fonts_path = File.join(dir,"..","fonts")

# Require any additional compass plugins here.
images_dir = File.join(dir, "..", "images")
output_style = :compressed
environment = :production

这是我的 app.scss 文件

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

@include icon-font('Test', inline-font-files(
  'Test/Test.woff', woff, 
  'Test/Test.ttf', truetype,
  'Test/Test.svg', svg
));

@include icon("airplane", "t", "Test");

那是我的目录

注意,使用的 iconmoon 字体在 Resources 文件夹的 Font 文件夹中。

【问题讨论】:

    标签: css ruby extjs sencha-touch-2 sass


    【解决方案1】:

    有人刚刚在另一个论坛上回答了我的问题。

    答案是

    将 iconmoon 字体放在 Ressources/Sass/stylesheet/font 文件夹中 不要修改 config.rb 使用正确的 FontName 将这些行添加到 app.scss

    //Load font
    @include icon-font('FontName', inline-font-files('fontname/fontname.woff', woff, 'fontname/fontname.ttf', truetype,'fontname/fontname.svg', svg));
    
    //Generate icon's class
    @include icon('cps-icon-arrow-right','CHARACTERSelected','FontName');
    .............
    

    【讨论】:

      猜你喜欢
      • 2021-09-03
      • 1970-01-01
      • 2022-01-14
      • 2012-08-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-17
      • 2020-11-19
      相关资源
      最近更新 更多