-
-
Save umkasanki/1d829b808b082566bd3cf1e9c8858638 to your computer and use it in GitHub Desktop.
SCSS grid mixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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