Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeyfigaro/fa100b2d1bdd5034f163bf5e73d969c5 to your computer and use it in GitHub Desktop.
Save joeyfigaro/fa100b2d1bdd5034f163bf5e73d969c5 to your computer and use it in GitHub Desktop.
A SCSS loop to combine verticals (product offerings) with icons and color backgrounds.
@mixin verticalLoop($vertical) {
$vertical-image-path: "#{$image-path-content}/icons/verticals/";
@each $color in color-black, color-white, color-honeycomb, color-clementine,
color-slushie, color-frosting, color-aloe, color-berry, color-wasabi,
color-grape, color-spice, color-wine, color-whale, color-honeycombLight,
color-clementineLight, color-slushieLight, color-frostingLight,
color-teaLight, color-berryLight, color-grapeLight, color-grayLightest,
color-grayLighter, color-grayLight, color-gray, color-grayDark,
color-grayDarker, color-grayDarkest {
&.vertical-icon {
background-image: url("#{$vertical-image-path}/#{$vertical}-color-black.svg") !important;
&.vertical-icon-#{$color} {
background-image: url("#{$vertical-image-path}/#{$vertical}-#{$color}.svg") !important;
} // &.concept-icon-#{$color}
} // &.concept-icon
} // @each $color in ...
}
li, div, tr {
@each $vertical in local, adventures, amazon, at-home, citywide, deals, escapes, families,
gourmet, nationwide, toad {
&.#{$vertical}, &.#{$vertical} td {
@include verticalLoop($vertical);
} // &.#{$vertical}
} // @each $vertical in...
} // li, div, tr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment