Skip to content

Instantly share code, notes, and snippets.

@1415926535
Created July 21, 2017 12:18
Show Gist options
  • Save 1415926535/74259daef3cb3c2aebc188e399e28168 to your computer and use it in GitHub Desktop.
Save 1415926535/74259daef3cb3c2aebc188e399e28168 to your computer and use it in GitHub Desktop.
// HELPER
$spaceamounts: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 75, 100
// Adjust this to include the pixel amounts you need.
$sides: top, bottom, left, right
// Leave this variable alone
@each $space in $spaceamounts
@each $side in $sides
.m-#{str-slice($side, 0, 1)}-#{$space}
margin-#{$side}: #{$space}px !important
.p-#{str-slice($side, 0, 1)}-#{$space}
padding-#{$side}: #{$space}px !important
// HELPER FIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment