Skip to content

Instantly share code, notes, and snippets.

@aquelito
Created March 26, 2014 21:09
Show Gist options
  • Save aquelito/9793631 to your computer and use it in GitHub Desktop.
Save aquelito/9793631 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@function array-value($list, $key) {
@each $item in $list {
@if ($key == nth($item, 1)) {
@return nth($item, 2);
}
}
@return false;
}
// Body color
$body-background: #F0F3F4;
// Body Text color
$body-color: #161616;
$colorz: (
default: red,
primary: green,
secondary: blue
) !default;
/*
# Background Colorz
* Body background : #{$body-background}
* Body text color : #{$body-color}
`.default-background` : #{array-value($colorz, 'default')}
`.primary-background` : #{array-value($colorz, 'primary')}
`.secondary-background` : #{array-value($colorz, 'secondary')}
`.black-background` : #000
`.white-background` : #fff
*/
/*
# Background Colorz
* Body background : #f0f3f4
* Body text color : #161616
`.default-background` : red
`.primary-background` : green
`.secondary-background` : blue
`.black-background` : #000
`.white-background` : #fff
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment