Skip to content

Instantly share code, notes, and snippets.

@wayferer
Last active May 31, 2016 16:11
Show Gist options
  • Save wayferer/9ca03d0c8d8b1b42bb236a33767445ca to your computer and use it in GitHub Desktop.
Save wayferer/9ca03d0c8d8b1b42bb236a33767445ca to your computer and use it in GitHub Desktop.
$col_1: #d50000;
$col_2: #C51162;
$col_3: #AA00FF;
$col_4: #6200EA;
$col_5: #304FFE;
$col_6: #2962FF;
$col_7: #0091EA;
$col_8: #00B8D4;
$col_9: #00BFA5;
$col_10: #00C853;
$col_11: #64DD17;
$col_12: #AEEA00;
$col_13: #FFD600;
$col_14: #FFAB00;
$col_15: #FF6D00;
$col_16: #DD2C00;
$col_17: #3E2723;
$col_18: #212121;
$col_19: #263238;
$col_20: #76608a;
$col_21: #6d8764;
$col_22: #008a00;
$col_23: #f0a30a;
$col_24: #a20025;
$color-list: $col_1, $col_2, $col_3, $col_4, $col_5, $col_6, $col_7, $col_8, $col_9, $col_10, $col_11, $col_12, $col_13, $col_14, $col_15, $col_16, $col_17, $col_18, $col_19, $col_20, $col_21, $col_22, $col_23, $col_24;
@for $i from 1 through length($color-list) {
.work-item:nth-of-type(#{length($color-list)}n+#{$i}) {
background-color: nth($color-list, $i);
}
}
@for $i from 1 through 3 {
.work-item:nth-of-type(#{length($color-list)}n+#{$i}) {
background-color: nth($color-list, random(length($color-list)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment