I want to change the default blue color of my Sencha Touch application to green. The steps I followed are listed below:
gem update --system
gem install compass
compass create myfile
Copied a
.scss
file and pasted it in thetouch-2.2.1/resources/sqss/
directory.Pasted the following code in that file and named it
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;
compass compile happy.scss
Replaced the name
happy.scss
in theapp.html
page.Ran the application, and I got the following error:
Syntax error: Undefined variable: "$font-family".\a on line 2 of /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/src/_Class.scss\a from line 1 of /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/src/_all.scss\a from line 1 of /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/_all.scss\a from line 3 of /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/sass/happy.scss\a\a 1: /Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/sass/happy.scss
How can I solve this?
Add the following line
Before this line
Also as per documentation
In Touch 2.1, your stylesheet looked like this:
In Touch 2.2, it looks like this: