Created
November 23, 2014 19:26
-
-
Save Eyal-Shalev/751b7bc0fd7511e50d8c 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.7) | |
// Compass (v1.0.1) | |
// ---- | |
// COLORS | |
// FUNCTIONS | |
// Returns the hex color key of a named color. | |
// @param String $name | |
@function color($name, $opacity: 1, $lighten: 0) { | |
@each $color, $names in $colors { | |
@if (contains($names, $name)) { | |
$color: rgba($color, $opacity); | |
$light-adjust-func: if($lighten >= 0, lighten, darken); | |
$color: call($light-adjust-func, $color, abs($lighten)); | |
@return $color; | |
} | |
} | |
@return null; | |
} | |
// VARIABLES | |
$color-palates: (); | |
$colors: ( | |
#363636: (text nav-button-active), | |
#edeeee: (background), | |
#898989: (nav-button), | |
#010101: (tab-active), | |
#9b9b9b: (menu-link tab-text tab-arrow), | |
#fe0000: (link-hover nav-button-hover tab-hover menu-link-hover), | |
#090909: (site-name menu-link-active internal-link), | |
#005494: (external-link-hover) | |
); | |
// MIXINS | |
@mixin color($color, $opacity: 1, $lighten: 0) { | |
color: color($color, $opacity, $lighten); | |
} | |
@mixin bg-color($color, $opacity: 1, $lighten: 0) { | |
background-color: color($color, $opacity, $lighten); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment