Book Image

Sass and Compass Designer's Cookbook

By : Bass Jobsen, Stuart Robson
Book Image

Sass and Compass Designer's Cookbook

By: Bass Jobsen, Stuart Robson

Overview of this book

Sass and Compass Designer's Cookbook helps you to get most out of CSS3 and harness its benefits to create engaging and receptive applications. This book will help you develop faster and reduce the maintenance time for your web development projects by using Sass and Compass. You will learn how to use with CSS frameworks such as Bootstrap and Foundation and understand how to use other libraries of pre-built mixins. You will also learn setting up a development environment with Gulp. This book guides you through all the concepts and gives you practical examples for full understanding.
Table of Contents (23 chapters)
Sass and Compass Designer's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating buttons with Bitters


Bitters scaffolds styles, variables, and structure for Bourbon projects. In this recipe, you will see how to use Bitters to style the buttons for your Bourbon projects.

Getting ready

Of course, you will have to install Ruby Sass as described in Chapter 1, Getting started with Sass, of this book. You also have to install Bourbon and Bitters. Run the following commands in your console to install Bourbon and Bitters:

gem install bourbon
gem install bitters

Note that Chapter 1, Getting Started with Sass, of this book also describes how to install Ruby and Ruby gems.

How to do it...

Perform the following steps to style your buttons with Bitters:

  1. Create the file and directory structure, as shown in the following:

  2. Navigate to the sass directory and run the following commands to copy the Bourbon and Bitters files:

    bourbon install
    bitters install --path=bitters
  3. Now, edit the sass/main.scss file and write down the following SCSS code in it:

    ''
    @import ''base/normalize'';
    @import...