Last active
February 3, 2017 17:47
-
-
Save kylefox/2550125fd847f258ff595b031e95eec2 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
$spacing-scale: ( | |
0, | |
0.3125rem, | |
0.625rem, | |
0.9375rem, | |
1.25rem, | |
1.5625rem, | |
3.125rem, | |
4.688rem, | |
6.25rem, | |
); | |
@each $value in $spacing-scale { | |
$index: index($spacing-scale, $value) - 1; | |
.ma#{$index} { margin: $value; } | |
.mt#{$index} { margin-top: $value; } | |
.mb#{$index} { margin-bottom: $value; } | |
.ml#{$index} { margin-left: $value; } | |
.mr#{$index} { margin-right: $value; } | |
.mv#{$index} { margin-top: $value; margin-bottom: $value; } | |
.mh#{$index} { margin-left: $value; margin-right: $value; } | |
.pa#{$index} { padding: $value; } | |
.pt#{$index} { padding-top: $value; } | |
.pb#{$index} { padding-bottom: $value; } | |
.pl#{$index} { padding-left: $value; } | |
.pr#{$index} { padding-right: $value; } | |
.pv#{$index} { padding-top: $value; padding-bottom: $value; } | |
.ph#{$index} { padding-left: $value; padding-right: $value; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment