O'Reilly logo

Ext JS 4 Web Application Development Cookbook by Stuart Ashworth, Andrew Duncan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating your own theme mixins

Mixins are a feature of SASS that allow you to easily re-use CSS styles, properties, and selectors without the need for unnecessary duplication.

This recipe will demonstrate how to make use of mixins in your SASS and how to make use of the compiled CSS in your application.

Getting ready

This recipe will require SASS and Compass to be set up so we can compile our SASS stylesheets. If you haven't already done so, please revisit the first recipe in this chapter and follow the instructions to get you started. You'll need to prepare a config.rb file for compiling your SASS like so:

sass_path = File.dirname(__FILE__)

css_path = sass_path

output_style = :expanded

How to do it...

  1. Start by creating a SASS file called CustomTheme.scss ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required