Skip to content

Instantly share code, notes, and snippets.

@bloqhead
Last active January 16, 2018 13:12
Show Gist options
  • Save bloqhead/e70591101e8ab254f5bc7ee7b3cc3dfc to your computer and use it in GitHub Desktop.
Save bloqhead/e70591101e8ab254f5bc7ee7b3cc3dfc to your computer and use it in GitHub Desktop.
//
// Grid
//
// Uses https://thingsym.github.io/flexbox-grid-mixins/
//
// override these in your own variables
$grid-column-count: 12 !default;
$grid-gutter: 2.5% !default;
$grid-activation-breakpoint: "min-width: 960px" !default;
@media ($grid-activation-breakpoint) {
// basic grid
.grid {
@include grid(
$flex-wrap: wrap,
$align-items: flex-start
);
}
// grid that centers things
.grid-center {
@include grid(
$align-items: center,
$justify-content: center
);
}
// grid that stretches things
.grid-stretch {
@include grid($align-items: stretch);
}
// setup the grid namespacing and cols
@for $i from 1 through 12 {
.grid__col-#{$i} {
@include grid-col(
$col: $i,
$grid-columns: $grid-column-count,
$condensed: true,
$gutter: $grid-gutter
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment