Skip to content

Instantly share code, notes, and snippets.

@kuanhsuh
Created April 29, 2017 00:03
Show Gist options
  • Save kuanhsuh/40c5b862ae5a897b60a4a308a449c193 to your computer and use it in GitHub Desktop.
Save kuanhsuh/40c5b862ae5a897b60a4a308a449c193 to your computer and use it in GitHub Desktop.
Mixins - Set text Color light or dark depends on background color
@function set-text-color($color){
@if (lightness($color) > 50){
@return #000;
} @else {
@return #fff;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment