Created
          October 9, 2017 19:39 
        
      - 
      
 - 
        
Save ericjames/a6c191de63655980ac61b4cebc0833af to your computer and use it in GitHub Desktop.  
    SASS Mixin for Color and Background
  
        
  
    
      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
    
  
  
    
  | @mixin setColor($property, $varName, $color) { | |
| @if $property == 'text' { | |
| color: $color; | |
| color: var($varName, $color); | |
| } | |
| @if $property == 'background' { | |
| background: $color; | |
| background: var($varName, $color); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment