开发者

Theming Sencha Touch - Compass & SSAS Required?

I'm pretty new to Sencha Touch. From what I've played with, it's a great framework. I'm working on my first production site and I'm having some issues wrapping my mind around the theming. Are Compass & SSAS really required to change the colors of the theme? It seems ludicrous to me that a simple color change would require so much work.

I've read this tut开发者_开发百科orial, as well as some others. Am I missing something?


You can ofcourse go and modify the CSS and replace all the colors you need, since Compass/SASS just compile to CSS. I would have to disagree with you though on that it's ludicrous. The base theme color is used in many different places and there are various gradient rules applied to it that Compass/SASS generates. Quite frankly it's very simple to only change it in one line in your sass file, run "compass compile" and be on your way versus digging through CSS find/replacing and then minifying it for production.


You should really look at Saas and Compass, nevertheless you will always have to override some css by hand because not all variables are yet defined in Sencha Touch. So some colors and other properties cannot be changed by modifying Sencha sass variables.

Anyway you should use sass so that your custom css code is located in your app.scss file and this will be compiled to the app.css. So you do not need to add any other .css file in your app structure.

And then you can add your own var to easily customize your own look.

To use compass and saas here is what you should do

First you need to install ruby (use RubyInstaller)

then install rubygems (Rubygems)

then install compass (gem install compass --pre )

then open your application *.scss file (should be in resources/sass/) and change some sencha variables. Then run compass compile in your resources/sass/ dir.

Then relaunch your app. It is that easy !

For more detail check this article I wrote not long ago : sass-for-sencha-touch-2-windows-7

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜