Skip to content

Instantly share code, notes, and snippets.

@bartwttewaall
Last active December 3, 2021 08:43
Show Gist options
  • Save bartwttewaall/8b3519593a46bcdb7cfe68f73c1683d8 to your computer and use it in GitHub Desktop.
Save bartwttewaall/8b3519593a46bcdb7cfe68f73c1683d8 to your computer and use it in GitHub Desktop.
// mixin for setting the gutter size
@mixin row-gutters($size) {
margin-right: -$size;
margin-left: -$size;
> .col,
> [class*='col-'] {
padding-right: $size;
padding-left: $size;
}
}
// add padding at the bottom of each col so we get even spacing throughout the columns and rows
.row.gutter-bottom {
> .col,
> [class^='col-'],
> [class*=' col-'] {
padding-bottom: $grid-gutter-width;
}
}
.small-gutters {
@include row-gutters(10px);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment