Skip to content

Instantly share code, notes, and snippets.

@triblondon
Created January 15, 2014 23:43
Show Gist options
  • Save triblondon/8447046 to your computer and use it in GitHub Desktop.
Save triblondon/8447046 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// 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);
}
.thing {
color: #333333;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment