Created
January 15, 2014 23:43
-
-
Save triblondon/8447046 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.3.0.rc.2) | |
// Compass (v1.0.0.alpha.17) | |
// ---- | |
$o-colors-is-silent: true !default; | |
$colorList: | |
pink #fff1e0, | |
black #000000, | |
blue #2e6e9e, | |
claret #9e2f50, | |
orange #d66d06, | |
charcoal #333333 | |
; | |
@function oColorsGetColor($name) { | |
@each $i in $colorList { | |
@if nth($i,1) == $name { | |
@return nth($i,2); | |
} | |
} | |
@return black | |
} | |
@each $i in $colorList{ | |
@if (not $o-colors-is-silent) { | |
.o-colors-#{nth($i,1)}--bg { | |
background-color: #{nth($i,2)}; | |
} | |
.o-colors-#{nth($i,1)}--fg { | |
color: #{nth($i,2)}; | |
} | |
} | |
} | |
.thing { | |
color: oColorsGetColor(charcoal); | |
} | |
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
.thing { | |
color: #333333; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment