Created
May 29, 2019 19:45
-
-
Save ericwbailey/29a33f87757da8051b3a583126e3d7fd to your computer and use it in GitHub Desktop.
#writing #thoughtbot
This file contains hidden or 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
@function c( | |
$name, | |
$theme:null, | |
$component:null, | |
) { | |
// Retrieve a palette color value | |
@if ($theme == null) and ($component == null) { | |
@return map-get($colors, $name); | |
} | |
// Retrieve a component color value | |
@else if ($theme != null) and ($component == null) { | |
@return map-get(map-get($colors, $name), $theme); | |
} | |
// Retrieve a themed component color value | |
@else { | |
@return map-get(map-get(map-get($colors, $name), $theme), $component); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment