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

Making custom buttons


In the Customizing Bootstrap with variables recipe in this chapter, you can read how to change Bootstrap's buttons by setting the brand color variables. In this recipe, you will learn how to extend Bootstrap with one or more custom buttons by leveraging Sass.

Getting ready

First, read the Downloading and installing Bootstrap recipe of this chapter to find out how to download and install Bootstrap, enabling you to recompile the Bootstrap CSS code. You can edit the Bootstrap source files with a text editor.

How to do it...

Learn how to extend Bootstrap with custom buttons:

  1. First, install Bootstrap as described in the Downloading and installing Bootstrap recipe of this chapter.

  2. Open the scss/bootstrap.scss file and write the following lines of SCSS code at the end of this file:

    .btn-custom {
     @include button-variant(white, darkblue, green);
    }
  3. After that, recompile Bootstrap's CSS by running the following command in your console:

    grunt dist
    
  4. Now, you can include the newly generated...