Shelves is packaged as a Rubygem, so installation is extremely simple:
$ gem install shelves
$ shelves --help
Running shelves on the command line outputs the generated grid directly to your terminal:
$ shelves
/*
SHELVES
...
So to output a grid directly to a file, use >
:
$ shelves > grid.css
Nearly every Sass variable is available as a command line option, so be sure to run with --help
to see everything that is available:
$ shelves --help
Option | Description | Default |
---|---|---|
Base Options |
||
‑w, ‑‑width WIDTH |
The max width. | 1060px |
‑c, ‑‑columns COLUMNS |
The number of columns. | 12 |
‑d, ‑‑margin MARGIN |
The outer margin. | 20px |
‑g, ‑‑gutter GUTTER |
The column gutter. Will be converted to a percentage value. | 20px |
‑N, ‑‑skip‑nested |
Do not include nested columns. | |
‑D, ‑‑skip‑desktop |
Do not include desktop columns. | |
‑T, ‑‑skip‑tablet |
Do not include tablet columns. | |
‑M, ‑‑skip‑mobile |
Do not include mobile columns. | |
Tablet Options |
||
‑‑tablet‑breakpoint |
The breakpoint for tablet devices. | 800px |
‑‑tablet‑columns |
The number of columns for tablet devices. | 6 |
‑‑tablet‑margin |
The outer margin for tablet devices. | 75% of margin |
‑‑tablet‑gutter |
The column gutter for tablet devices. | 150% of gutter |
Mobile Options |
||
‑‑mobile‑breakpoint |
The breakpoint for mobile devices. | 480px |
‑‑mobile‑columns |
The number of columns for mobile devices. | 4 |
‑‑mobile‑margin |
The outer margin for mobile devices. | 50% of margin |
‑‑mobile‑gutter |
The column gutter for mobile devices. | 238% of gutter |
Advanced Options |
||
‑‑skip‑center |
Do not include center column helper. | |
‑‑skip‑visibility |
Do not include visibility helpers. | |
‑‑skip‑ie7‑support |
Skip legacy support for IE7. | |
‑‑skip‑prefixes |
Do not include prefix classes. | |
‑‑skip‑suffixes |
Do not include suffix classes. | |
‑‑skip‑pushes |
Do not include push classes. | |
‑‑skip‑pulls |
Do not include pull classes. | |
‑‑nested‑prefixes |
Include prefix classes for nested columns. | |
‑‑nested‑suffixes |
Include suffix classes for nested columns. | |
‑‑nested‑pushes |
Include push classes for nested columns. | |
‑‑nested‑pulls |
Include pull classes for nested columns. | |
‑‑tablet‑prefixes |
Include prefix classes for tablet columns. | |
‑‑tablet‑suffixes |
Include suffix classes for tablet columns. | |
‑‑tablet‑pushes |
Include push classes for tablet columns. | |
‑‑tablet‑pulls |
Include pull classes for tablet columns. | |
‑‑mobile‑prefixes |
Include prefix classes for mobile columns. | |
‑‑mobile‑suffixes |
Include suffix classes for mobile columns. | |
‑‑mobile‑pushes |
Include push classes for mobile columns. | |
‑‑mobile‑pulls |
Include pull classes for mobile columns. |