Required files
SCSS files required: _objects.grid.scss
Grid system
This grid system uses flexbox.
The grid file objects.grid.scss
includes 12 column sizes at small, medium and large breakpoints, and the same for offsets.
Grid gutters
The grid includes 20px gutters as default but can be changed with the modifying classes available.
To remove all gutters (vertical, horizontal gutters or both): .grid--v-gutter-none
, .grid--h-gutter-none
, .grid--gutter-none
.
For small gutters (15px) (vertical, horizontal gutters or both): .grid--v-gutter-sm
, .grid--h-gutter-sm
, .grid--gutter-sm
.
For extra small gutters (10px) (vertical, horizontal gutters or both): .grid--v-gutter-xs
, .grid--h-gutter-xs
, .grid--gutter-xs
.
Grid responsive
The container requires the class .grid
and each grid column requires the class .grid__col
which is full width by default.
Classes can then be added starting with .grid__col-
plus the amount of columns eg. .grid__col
for full width and .grid__col-6
for half width.
The column widths can be modified at each breakpoint. For example the following classes can all be added to one grid column and the width of the column will change at all the breakpoints: grid__col
grid__col-sm-3
grid__col-md-6
grid__col-lg-7
The following grid example uses the default grid column class at 12 column width (full width) and then applies one more to each at the medium breakpoint. Resulting that all columns will be full width at mobile size and then various column widths at the medium breakpoint.
Grid offsets
Offset classes can be applied in the same way as grid column classes, but with 'offset' in the class, plus the amount of columns and then the breakpoint.
For example the following classes can all be added to one grid column and the width of the offset will change at all the breakpoints: .grid__col-offset-3
.grid__col-offset-sm-5
.grid__col-offset-md-8
.grid__col-offset-lg-10
Grid nested
Grids can be easily nested and they will maintain the gutter spacing as seen in the example below.
Grid modifying helpers
To reverse the grid apply the modifying class .grid--reverse
.