Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@zastrow
Created June 17, 2019 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zastrow/8b194bc2e35819d736f1b96b6096ca6e to your computer and use it in GitHub Desktop.
Save zastrow/8b194bc2e35819d736f1b96b6096ca6e to your computer and use it in GitHub Desktop.
@mixin spacing-loop($property, $space, $value) {
@each $poskey, $posvalue in $spacing-key {
&-#{$poskey}-#{$space} {
@if $poskey == "all" {
#{$property}: $value;
}
@else if $poskey == "vert" {
#{$property}-top: $value;
#{$property}-bottom: $value;
}
@else if $poskey == "horiz" {
#{$property}-right: $value;
#{$property}-left: $value;
}
@else {
#{$property}-#{$posvalue}: $value;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment