Created
April 16, 2015 01:14
-
-
Save chriswburke/fa42d954d53bc4c9a8e3 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.12) | |
// Compass (v1.0.3) | |
// ---- | |
$colors: ( | |
'gold': ( | |
0: #a49262, | |
1: #c5bb9d, | |
2: #dfdac9, | |
), | |
'grey': ( | |
0: #2f2f2f, | |
1: #9b9b9b, | |
2: #cacaca, | |
), | |
'red': #ca1010, | |
'pink': #ed7ba3, | |
'blue': #1f9bde, | |
'black': #060f2c, | |
'white': #f9f9f6, | |
); | |
@function color($name, $variant: null) { | |
$color: null; | |
@if $variant { | |
$color-spectrum: map-get($colors, $name); | |
$color: map-get($color-spectrum, $variant); | |
} @else { | |
$color: map-get($colors, $name) | |
} | |
@return $color; | |
} | |
.single { | |
background: color('black'); | |
} | |
.variant { | |
background: color('gold', 0); | |
} |
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
.single { | |
background: #060f2c; | |
} | |
.variant { | |
background: #a49262; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment