-
-
Save amirkhiz/8b71f1e27b3227100edcef61fcdf397a to your computer and use it in GitHub Desktop.
Arrays with LESS
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
@material-colors: red #f44336, | |
pink #e91e63, | |
purple #9c27b0, | |
deep-purple #673ab7, | |
indigo #3f51b5, | |
blue #2196f3, | |
light-blue #03a9f4, | |
cyan #00bcd4, | |
teal #009688, | |
green #4caf50, | |
light-green #8bc34a, | |
lime #cddc39, | |
yellow #ffeb3b, | |
amber #ffc107, | |
orange #ff9800, | |
deep-orange #ff5722, | |
blue-grey #607d8b; | |
.iter(length(@material-colors)); | |
.iter(@i) when (@i > 0) { | |
.iter(@i - 1); | |
@pair: extract(@material-colors, @i); | |
@key: extract(@pair, 1); | |
@value: extract(@pair, 2); | |
.checkbox--@{key}:checked:before { | |
color: @value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source