Created
April 7, 2016 23:55
-
-
Save jarbitlira/3571aee06414c4286d882b7e889bb73a to your computer and use it in GitHub Desktop.
generate class helpers
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
.generateClasses(@propertyName, @prefixName) { | |
.properties(@counter, @to, @step: 10) when (@counter < @to) { | |
.properties((@counter + @step), @to, @step ); | |
.@{prefixName}-@{counter} { | |
@{propertyName}: unit(@counter, px); | |
} | |
.@{prefixName}-top-@{counter} { | |
@{propertyName}-top: unit(@counter, px); | |
} | |
.@{prefixName}-bottom-@{counter} { | |
@{propertyName}-bottom: unit(@counter, px); | |
} | |
.@{prefixName}-left-@{counter} { | |
@{propertyName}-left: unit(@counter, px); | |
} | |
.@{prefixName}-right-@{counter} { | |
@{propertyName}-right: unit(@counter, px); | |
} | |
} | |
.properties(0, 100, 10); | |
} | |
.generateClasses(padding, pad); | |
.generateClasses(margin, mar); |
Author
jarbitlira
commented
Apr 8, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment