GRIDdle
( (
)\ ) )\ (
____ ____ ___ ____ (()/(((_) ))\
/ ___| _ \|_ _| _ \ ((_))_ /((_)
| | _| |_) || || | | | _| || |(_))
| |_| | _ < | || |_| |/ _` || |/ -_)
\____|_| \_\___|____/ \__,_||_|\___|
A simple set of helpers for working with CSS Grid.
Getting Started
GRIDdle is not a Grid Framework for CSS Grids. Rather, it's a set of helpers for writing sets of common CSS Grid properties together, in language that is likely to be more familiar to those who have used tools like Susy, Singularity, Foundation, or Bootstrap. There is no magic, just CSS Grids, so be sure you have brushed up on the docs and take a look at CSS Trick's Complete Guide to Grid before using.
Installation
GRIDdle is distributed as an NPM Module optimized for use with Eyeglass (if you're using it). To install, run the following:
$ npm install sass-griddle --save-dev
Then, in your Sass, import GRIDdle:
; // Or path to _griddle.scss if not using Eyeglass
Usage
Grid Setup Helpers
grid($grid, $gap) / columns($grid, $gap) [mixin]
Mixins to define grid columns.
$grid
- The grid to use for columns$gap
- The gap between each column. Will apply to both column and row gap
Sample Input
.container
Sample Output
.container
vertical-grid($grid, $gap) / rows($grid, $gap) [mixin]
Mixins to define grid rows.
$grid
- The grid to use for rows.$gap
- The gap between each row
Sample Input
.container
Sample Output
.container
Span Helpers
span($span, [$start]) / column-span($span, [$start]) [mixin]
A mixin to span a number of columns.
$span
- The number of columns to span$start
- The column to start the span at (optional)
Sample Input
.item .item-2
Sample Output
.item .item-2
vertical-span($span, [$start]) / row-span($span, [$start]) [mixin]
Mixins to span a number of rows.
$span
- The number of row to span$start
- The row to start the span at (optional)
Sample Input
.item .item-2
Sample Output
.item .item-2