Skip to content

Instantly share code, notes, and snippets.

@umkasanki
Created February 6, 2019 06:29
Show Gist options
  • Save umkasanki/1d829b808b082566bd3cf1e9c8858638 to your computer and use it in GitHub Desktop.
Save umkasanki/1d829b808b082566bd3cf1e9c8858638 to your computer and use it in GitHub Desktop.
SCSS grid mixin
@mixin row($gap: $gap, $justify-content: flex-start, $align-items: flex-start, $wrap: wrap) {
display: flex;
width: auto;
justify-content: $justify-content;
align-items: $align-items;
flex-wrap: $wrap;
@if $gap != 0 {
margin-left: $gap * -1;
}
> * {
padding-left: $gap;
}
}
@mixin column($width: 12) {
display: block;
width: ((100% / 12) * $width);
box-sizing: border-box;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment