Susy - Compass Plugin

Susy is a semantic CSS grid system for designers.

Use Susy anywhere. Static sites, Rails sites, Django sites, PHP sites, etc. You name it. Susy just helps you with the grid - whether you want it fixed, fluid, elastic or Susy's specialty: fluid on the inside and elastic on the outside. And Susy will do it all without ever touching your markup.

Built entirely native to [Compass](compass-style.org/), Susy is based on the philosophy and techniques of [Natalie Downe](natbat.net/)‘s “[CSS Systems](natbat.net/2008/Sep/28/css-systems/)” - which introduces difficult math in return for beautiful structure. Now Susy will do that math for you and let you focus on your designs.

Install

sudo gem install compass-susy-plugin

Create a Susy-based Compass Project

compass create <project name> -r susy -u susy

Philosophy and Goals

The method comes from [Natalie Downe](natbat.net/)‘s “[CSS Systems](natbat.net/2008/Sep/28/css-systems/)”, but I'll cover it here.

It is important for accessibility and usability that we are:

In order to achieve both goals we need to combine the best of the elastic (em-based) and fluid (%-based) models. The solution is simple: First we build a fluid grid, then place it inside an elastic shell, and apply a maximum width to that shell so that it never exceeds the size of the viewport. It's simple in theory, but daunting in practice, as you constantly have to adjust your math based on the context.

But Susy harnesses the power of Compass and Sass to do all the math for you.

Grid Basics

That's it for the basics! Here's a sample Susy grid layout:

#page {
  @include container;
}

header {
  @include full;
  @include pad(1,1);

  h1 {
    @include full(10);
  }
}

nav {
  @include columns(3);
  @include alpha;
}

#content {
  @include columns(9);
  @include omega;
  #main {
    @include columns(6,9);
  }
  aside {
    @include columns(3,9);
    @include omega(9);
  }
}

Tutorial

Check out the tutorial at [susy.oddbird.net/tutorial/](susy.oddbird.net/tutorial/) for more details.

Show your grids

grid. Using CSS3 gradients, Susy will show you that grid - and it will flex right along with your site.

Advanced Options

Susy is built for flexibility, so that you always write the code you want to write. While everything should 'just work' out of the box, there are plenty of advanced options hidden inside. Here are a few:

Susy now also supports right-to-left and bi-directional documents. For a simple toggle, set the default `$from-direction` (defaults to `left`). For more specific control, you can pass an additional, localized `$from-direction` argument to any of the Susy mixins that need to know: