Skip to content

Instantly share code, notes, and snippets.

@orlando
Created April 3, 2016 03:11
Show Gist options
  • Save orlando/f51f10f3b5451db0746480193a9ce4fb to your computer and use it in GitHub Desktop.
Save orlando/f51f10f3b5451db0746480193a9ce4fb to your computer and use it in GitHub Desktop.
padding margins helpers
// padding/margins helpers
$sizes: (xs: 0.5rem, sm: 1rem, md: 1.5rem, lg: 2rem, xl: 2.5rem);
$properties: ('top', 'right', 'left', 'bottom');
@each $name, $value in $sizes {
@each $prop in $properties {
.margin-#{$prop}-#{$name} {
margin-#{$prop}: $value;
}
.padding-#{$prop}-#{$name} {
padding-#{$prop}: $value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment