Skip to content

Instantly share code, notes, and snippets.

@amirkhiz
Last active March 11, 2017 13:49
Show Gist options
  • Save amirkhiz/8b71f1e27b3227100edcef61fcdf397a to your computer and use it in GitHub Desktop.
Save amirkhiz/8b71f1e27b3227100edcef61fcdf397a to your computer and use it in GitHub Desktop.
Arrays with LESS
@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;
}
}
@amirkhiz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment