Skip to content

Instantly share code, notes, and snippets.

@etoxin
Created March 23, 2015 04:01
Show Gist options
  • Select an option

  • Save etoxin/54e6ee556071d4490fda to your computer and use it in GitHub Desktop.

Select an option

Save etoxin/54e6ee556071d4490fda to your computer and use it in GitHub Desktop.
Complex Each in Sass / scss
// icon colouring.
$icon-color-set: (black $black),
(white $white),
(green $green),
(orange $orange),
(red $red),
(utility-blue $utility-blue),
(ocean-blue $ocean-blue),
(transition-blue2 $transition-blue2),
(transition-blue3 $transition-blue3),
(deep-current $deep-current),
(seagrass $seagrass),
(turquoise-sea $turquoise-sea),
(sky-blue $sky-blue),
(horizon-blue $horizon-blue),
(sea-spray $sea-spray),
(mount-cook-river $mount-cook-river),
(spinifex $spinifex),
(driftwood $driftwood),
(golden-shore $golden-shore),
(west-coast $west-coast),
(rockpool $rockpool),
(anz-grey $anz-grey),
(ocean-deep-grey $ocean-deep-grey),
(ocean-mid-grey $ocean-mid-grey),
(ocean-light-grey $ocean-light-grey);
@each $color in $icon-color-set{
.icon-#{nth($color, 1)}{
&.icon-round{
background: nth($color, 2);
color: white;
}
color: nth($color, 2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment