Created
November 6, 2014 05:43
-
-
Save gbhasha/cb2b3ca40b451777c2bd to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
// ---- | |
// 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; | |
@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 { | |
@each $tile-type in $tile-types { | |
&.tile--#{$tile-type} { | |
background-image: image-url("tile/#{$tile-type}-#{$state}.svg") | |
} | |
} | |
} | |
} | |
} | |
This file contains 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
.tile--active { | |
color: #FFF; | |
background-color: #4C9CEA; | |
} | |
.tile--active .tile__image.tile--business { | |
background-image: url('/images/tile/business-active.svg'); | |
} | |
.tile--active .tile__image.tile--home { | |
background-image: url('/images/tile/home-active.svg'); | |
} | |
.tile--inactive { | |
color: #000; | |
background-color: #FFF; | |
} | |
.tile--inactive .tile__image.tile--business { | |
background-image: url('/images/tile/business-inactive.svg'); | |
} | |
.tile--inactive .tile__image.tile--home { | |
background-image: url('/images/tile/home-inactive.svg'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment