Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Mastering the Compass/SASS Setup with Sencha Touch

  1. #21
    Sencha User
    Join Date
    Nov 2012

    Default nice tutorial!!

    hi.. tis is really nice i was suffering a lot for 3 days for an error but after reading tis thing i found out thx!!!

  2. #22
    Sencha User
    Join Date
    Dec 2012

    Default thanks a lot!

    you've saved a few days for me!

  3. #23
    Sencha User
    Join Date
    May 2011
    Melbourne, Australia

    Default Appreciated.

    I've inherited an interesting project. ST2.0 project built with Architect.

    This project was upgraded to 2.1 using the inbuilt functionality of the new Architect.

    What this left me with was the original /sdk/resources, /touch/resources, /resources and interestingly another folder ../resources (yes, in parent of app folder) that had another /touch/ folder just for good measure of confusion.

    Architect had scattered the working config into a chaotic mess. Found out the old project aliased the styling build from the parent resource folder into the app resources to help with build speeds.

    Likewise, I've 15 years in (mostly) front-end development working with majority of frameworks and backends. Untangling this project was becoming a nightmare. This post was a ray of enlightenment and the final piece to solving the gordian knot.

    Many thanks.

  4. #24
    Sencha User
    Join Date
    May 2011
    Melbourne, Australia

    Default One thing though...

    How you've altered the import pathing for the sencha touch "compass extension" (

    @import 'sencha-touch/default/all';
    Firstly, consider this path from the config.rb:

    // Points to the Sencha Touch theme
    load File.join(sass_path, '..', 'themes')
    Within this directory one finds a file compass_init.rb.

    # This file registers the sencha-touch framework with compass
    # It's a magic name that compass knows how to find.
    dir = File.dirname(__FILE__)
    require File.join(dir, 'lib', 'theme_images.rb')
    # Include compass-recipes
    require File.join(File.dirname(__FILE__), 'vendor', 'compass-recipes', 'config')
    Compass::BrowserSupport.add_support('repeating-linear-gradient', 'webkit', 'moz', 'o', 'ms')
    Compass::Frameworks.register 'sencha-touch', dir
    The important points:
    • "sencha-touch" becomes a registered framework extension for this project.
    • images you've hard referenced via your config.rb file are originally included by this compass_init.rb and its referenced /themes/lib/theme_images.rb file.
    • using as a framework extension makes "@import 'sencha-touch/default/all';" also work, and not require modification.
    @markwyner's original post is very helpful for understanding the development structure of the compass/sass element of touch. One should read the linked page at the top of my message on compass extensions as well as compass configuration ( before making multiple changes to their config.rb file.

  5. #25



    when I use the command compass compile It get the error

    Line 23 of _button.scss: Undefined variable: "$base-gradient".

    I have defined the variable "$base-gradient" in scss file.

  6. #26
    Sencha User
    Join Date
    Nov 2015

    Default gooooooooooooooood

Page 3 of 3 FirstFirst 123

Similar Threads

  1. How to use sencha touch css in SASS
    By kevinv1990 in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 3 Mar 2011, 12:58 AM
  2. SASS & Sencha Touch: how do I apply a gradient to a pressed list item?
    By bklaas in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 26 Feb 2011, 1:30 PM
  3. Compass / SASS questions?
    By Bucs in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 17 Feb 2011, 8:37 PM
  4. more info about themes and sass in sencha touch?
    By RobinQu in forum Sencha Touch 1.x: Discussion
    Replies: 10
    Last Post: 21 Dec 2010, 10:21 AM
  5. Compass SASS - How to in 0.96 ?
    By emroot in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 8 Oct 2010, 7:53 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts