Created
August 5, 2018 15:16
-
-
Save rub1cc/ac6cff62e5aa583b505d943869b875cb to your computer and use it in GitHub Desktop.
Padding and Margin Helper (SASS)
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: (5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100); | |
$sides: (top, bottom, left, right); | |
@each $space in $spaceamounts { | |
@each $side in $sides { | |
.m#{str-slice($side, 0, 1)}-#{$space} { | |
margin-#{$side}: #{$space}px; | |
} | |
.p#{str-slice($side, 0, 1)}-#{$space} { | |
padding-#{$side}: #{$space}px; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment