php|architect - July 2013 by php|architect
Author:php|architect
Language: eng
Format: epub
Publisher: php[architect]
Published: 2013-07-27T04:00:00+00:00
Styling and Fine-tuning Beyond the Basics
All the standard components are, of course, a great way to get your basic applications out there and to provide your users with the services they are looking for, but your app might not feel ‘hipster’ enough yet. To work on putting your own flavor on your app, you can get creative by styling the components you’re using.
For this, Sencha uses a Ruby gem called Compass (http://compass-style.org). Compass is described as a “CSS Authoring Framework” and is built on SASS which describes itself as “an extension of CSS3”.
Once you have the Ruby gem installer on your system (installed by default on Macs), you can run the following command to get Compass:
gem install compass
You’ll need to do this only once as it will make Compass generally available on your system.
You can then go to the folder containing your project’s SASS file (by default: resources/sass), and run the following command:
compass watch
Compass will now listen for changes to your app.scss file and trigger a new build of the CSS once you save the SASS file. Remember that building might take some time. Before you refresh your browser, you might want to check your command-line screen to see if building the file has already finished.
Now it’s time to start editing. Open the resources/sass/app.scss file. The most basic editing is just plain CSS you’d use in any web application or website, but SASS really shows its power when we start using the pre-defined variables.
The most drastic change is to change the $base-color variable provided by Sencha Touch. By putting the following line on top of our app, we will see a huge change in our color scheme:
$base-color: #DC5921;
Once Compass has finished building the application, we will see that the whole color scheme has changed to php[architect]’s main color, as shown in Figure 6.
Figure 6: The event being handledAll the available SASS variables and mixins can be found in the Sencha Touch documentation and provide a lot of ways to style an app in any way you see fit.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Kathy Andrews Collection by Kathy Andrews(11304)
The remains of the day by Kazuo Ishiguro(8365)
Paper Towns by Green John(4780)
Spare by Prince Harry The Duke of Sussex(4769)
The Body: A Guide for Occupants by Bill Bryson(4565)
Industrial Automation from Scratch: A hands-on guide to using sensors, actuators, PLCs, HMIs, and SCADA to automate industrial processes by Olushola Akande(4533)
Be in a Treehouse by Pete Nelson(3635)
Harry Potter and the Goblet Of Fire by J.K. Rowling(3594)
Machine Learning at Scale with H2O by Gregory Keys | David Whiting(3539)
Never by Ken Follett(3505)
Goodbye Paradise(3430)
The Remains of the Day by Kazuo Ishiguro(3122)
Into Thin Air by Jon Krakauer(3119)
The Cellar by Natasha Preston(3071)
The Genius of Japanese Carpentry by Azby Brown(3029)
Drawing Shortcuts: Developing Quick Drawing Skills Using Today's Technology by Leggitt Jim(2934)
120 Days of Sodom by Marquis de Sade(2931)
Fairy Tale by Stephen King(2914)
The Man Who Died Twice by Richard Osman(2792)
