Created
September 19, 2014 13:23
-
-
Save atleb/8534da214dd5272ac35b 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.4) | |
// Compass (v1.0.1) | |
// ---- | |
@function map-fetch($map, $keys) { | |
$key: nth($keys, 1); | |
$length: length($keys); | |
$value: map-get($map, $key); | |
@if ($length > 1) { | |
$rest: (); | |
@for $i from 2 through $length { | |
$rest: append($rest, nth($keys, $i)) | |
} | |
@return map-fetch($value, $rest) | |
} @else { | |
@if ($value){ @return $value;} | |
@else { @return map-get($default, $key) } | |
} | |
} | |
$default: ( | |
colorTitle: #fff | |
); | |
$config: ( | |
themes: ( | |
Default: ( | |
colorMain: #fff | |
), | |
Meninger: ( | |
colorMain: none, | |
colorTitle: #2e87a7 | |
), | |
Sport: ( | |
colorMain: none | |
) | |
) | |
); | |
@mixin containerTheme($headerBgColor, $headerTextColor: #fff ){ | |
& { | |
.df-container-header { | |
color: $headerTextColor; | |
} | |
} | |
} | |
@each $theme in map-keys(map-get($config, themes)) { | |
df-skin-row-#{$theme} { | |
@include containerTheme( | |
map-fetch($config, themes $theme colorMain), | |
map-fetch($config, themes $theme colorTitle) | |
); | |
} | |
} |
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
df-skin-row-Default .df-container-header { | |
color: #fff; | |
} | |
df-skin-row-Meninger .df-container-header { | |
color: #2e87a7; | |
} | |
df-skin-row-Sport .df-container-header { | |
color: #fff; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment