Skip to content

Instantly share code, notes, and snippets.

@rishabh-ink
Forked from harshai/SassMeister-input.scss
Last active August 29, 2015 14:08
Show Gist options
  • Save rishabh-ink/3e11d226ae272681659a to your computer and use it in GitHub Desktop.
Save rishabh-ink/3e11d226ae272681659a to your computer and use it in GitHub Desktop.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
/* Alias */
$config__tile: (
"active": (
"background-color": #4C9CEA,
"text-color": #FFF
),
"inactive": (
"background-color": #FFF,
"text-color": #000
)
);
/* Lists */
$states: active inactive;
$tile-types: business home;
.tile {
@each $state in $states {
&.tile--#{$state} {
color: map-get(map-get($config__tile, $state), "text-color");
background-color: map-get(map-get($config__tile, $state), "background-color");
.tile__image {
background-color: map-get(map-get($config__tile, $state), "background-color");
@each $tile-type in $tile-types {
&.tile--#{$tile-type} {
background-image: image-url("tile/#{$tile-type}-#{$state}.svg")
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment