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.
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