Created
December 17, 2014 14:09
-
-
Save lmartins/6e0c573e868906bae977 to your computer and use it in GitHub Desktop.
Color management with Sass
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
// Color Settings | |
$color: ( | |
nav: ( | |
text: #333, | |
text-hover: #FFF, | |
bg: #FFF, | |
bg-hover: #FEF160 | |
), | |
site-footer: ( | |
title: #FFF, | |
info-border: rgba(#FFF, 0.1), | |
bg: #2A3137 | |
) | |
); | |
// Helper Function | |
@function color($el, $color, $map: $colors) { | |
@return map-get(map-get($map, $el), $color); | |
} | |
// Usage | |
.site-footer { | |
background-color: color(site-footer, bg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment