Fawar
Fawar

Reputation: 735

Sencha build - app.scss crashes

I have tried to follow this exemple :

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

Which explains how to setup your app to use iconmoon fonts.

Did exactly has they explained and it didn't work. I'm far from being any good at Ruby, css or scss so it might be a stupid error.

Here is the error report : Error Report

Here is my config.rb file :

# 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

Here is my app.scss file

@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");

And that is my directory Directory

Note that the iconmoon font used is in the Font folder of the Resources folder.

Upvotes: 1

Views: 639

Answers (1)

Fawar
Fawar

Reputation: 735

Someone just answered my question on another forum.

Answer is

Put the iconmoon font in the Ressources/Sass/stylesheet/font folder Do not modify the config.rb Add these line to the app.scss with the correct FontName

//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');
.............

Upvotes: 1

Related Questions