Created
January 7, 2019 17:12
-
-
Save Christilut/ca418de3e04ef1bc5d6ccb30164088df to your computer and use it in GitHub Desktop.
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
$g: 20px; | |
$props: ( | |
(margin, ma), | |
(margin-top, mt), | |
(margin-bottom, mb), | |
(margin-left, ml), | |
(margin-right, mr), | |
(padding, pa), | |
(padding-top, pt), | |
(padding-bottom, pb), | |
(padding-left, pl), | |
(padding-right, pr) | |
); | |
@mixin generateLayoutHelpers($proplist) { | |
@each $prop, $className in $proplist { | |
.#{$className} { | |
#{$prop}: $g; | |
} | |
.#{$className}-s { | |
#{$prop}: $g / 4; | |
} | |
.#{$className}-m { | |
#{$prop}: $g / 2; | |
} | |
} | |
} | |
@include generateLayoutHelpers($props); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment