Last active
September 13, 2018 16:50
-
-
Save teknotica/5f0faf632ee0c8282f42 to your computer and use it in GitHub Desktop.
LESS loop
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
@bulletcolours: | |
black @color-black, | |
blue @color-blue, | |
red @color-red, | |
green @color-green, | |
yellow @color-yellow, | |
navy @color-navy, | |
orange @color-orange, | |
grey @color-grey; | |
.coloursBulletSelectors (@i) when (@i > 0) { | |
@item: extract(@bulletcolours, @i); | |
@label: extract(@item, 1); | |
@colour: extract(@item, 2); | |
&.circles-@{label} { | |
li:before { | |
padding: 10px; | |
background-color: @colour; | |
} | |
} | |
.coloursBulletSelectors((@i - 1)); | |
} | |
.coloursBulletSelectors( length(@bulletcolours) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment