Created
August 16, 2018 06:18
-
-
Save mlbd/39208893c6a1de585fd095df8c449fe7 to your computer and use it in GitHub Desktop.
This file contains 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
$spaceamounts: ('none', 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 75, 80, 100, 150); // 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} { | |
@if $space == 'none' { | |
margin-#{$side}: 0px !important; | |
} @else { | |
margin-#{$side}: #{$space}px !important; | |
} | |
} | |
.p-#{str-slice($side, 0, 1)}-#{$space} { | |
@if $space == 'none' { | |
padding-#{$side}: 0px !important; | |
} @else { | |
padding-#{$side}: #{$space}px !important; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment