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

Creating visual triangles

You can create triangles with pure CSS, and you can use these triangles to create a triangular pointer for tooltips or other components of your project. In this recipe, you will learn how to use Bourbon to create tooltips with triangular pointers for your projects.

Getting ready

Make sure that you have installed Bourbon already, as described in the Bourbon mixins for prefixing recipe of this chapter.

How to do it...

The following steps help you to understand how to create pure CSS triangles with the Bourbon library:

  1. After installing Bourbon, you should create the file and directory structure as shown in the following screenshot:

  2. The sass/main.scss file should contain the SCSS code, as shown here:

    @import 'bourbon/bourbon';
    $tooltip-backgroundcolor: #ffffa5;
    $tooltip-color: #000;
    $tooltip-height: 4em;
    $tooltip-width: 8em;
    .tooltip {
      background-color: $tooltip-backgroundcolor;
      height: $tooltip-height;
      position: relative;
      width: $tooltip-width;
      h2 {