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

Generating asymmetric layouts


With asymmetric layouts, you can create something unique and different that attracts attention. Most grid-based layouts are in some way symmetrical, because of the equal size columns of the grid. In this recipe, you will learn how to create asymmetric grids with columns of different widths, and how apply your designs to them.

Getting ready

First, install both Sass and Susy. Read the Installing and configuring Susy recipe of this chapter to find out how to do this.

How to do it...

Learn how to create asymmetric layout with Susy by performing the following steps:

  1. Create a file and directory structure, which should look as follows:

  2. Secondly, open the file the main.scss file and edit the SCSS code so that your SCSS code looks as follows:

    @import 'utils/variables';
    @import 'base/normalise';
    @import 'susy';
    
    body {
      @include container();
      padding: gutter();
    }
    
    header {
      background-color: $header-background-color;
      color: $header-font-color;
    }
    
    section {
      article {
    ...