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
About the Author
About the Reviewers

Integrating Bootstrap

Bootstrap is an HTML, CSS, and JS framework for developing responsive, mobile-first projects on the web. Bootstrap 4 is built with Sass. In this recipe, you will learn how to use Bootstrap when developing Ruby on Rails web applications.

Getting ready

You can read more about Bootstrap 4 in Chapter 12, Bootstrap and Sass, of this book. Note that the code in this recipe uses the alpha release of Bootstrap 4. You should not use alpha or beta releases for production. The final release of Bootstrap 4 may differ from the alpha release.

How to do it...

Integrate Bootstrap into your RoR app by performing the following steps:

  1. Repeat the steps of the Hello world with Ruby on Rails recipe of this chapter to create a new RoR app; also, create a controller called welcome with an action called index.

  2. Then, add the Bootstrap and Autoprefixer gems to your application's Gemfile as follows and run the bundle command afterwards:

    gem 'bootstrap', '~> 4.0.0.alpha3'
    gem "autoprefixer-rails"
  3. Rename...