Last active
August 29, 2015 13:55
-
-
Save seven-phases-max/8697735 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
@import "for"; // see https://github.com/seven-phases-max/less.curious/blob/master/src/for.less | |
.map(@property, @class-value-list...) { | |
.for(@class-value-list); .-each(@value) { | |
@class: extract(@value, 1); | |
.@{class} {@{property}: extract(@value, 2)} | |
} | |
} | |
// usage: | |
.map(background-position; | |
class-1, 100px 50px; | |
class-2, 200px 150px; | |
class-3, 300px 250px); | |
.map(color; foo red, bar green, baz blue); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment