-
-
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.
This file contains hidden or 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
@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