Last active
April 26, 2018 12:56
-
-
Save wiyoe/cfab9e36d49ed1de33d480b4c526876c to your computer and use it in GitHub Desktop.
Sass default margins and paddings generator.
This file contains hidden or 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
| $size: 8; | |
| $margins: (mb: margin-bottom, mt: margin-top, mr: margin-right, ml: margin-left); | |
| @each $key, $item in $margins { | |
| @for $i from 1 through $size { | |
| .#{$key}-#{$i} { | |
| #{$item}: (2em * $i) / 4; | |
| } | |
| } | |
| } | |
| $paddings: (pb: padding-bottom, pt: padding-top, pr: padding-right, pl: padding-left); | |
| @each $key, $item in $paddings { | |
| @for $i from 1 through $size { | |
| .#{$key}-#{$i} { | |
| #{$item}: #{$i}px!important; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment