Skip to content

Instantly share code, notes, and snippets.

@zastrow
Created April 5, 2017 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zastrow/5acf8e9e74cd7f795f8e621005562938 to your computer and use it in GitHub Desktop.
Save zastrow/5acf8e9e74cd7f795f8e621005562938 to your computer and use it in GitHub Desktop.
Simple color function for defining grays with Sass
// Grayscale
@function gray($level) {
@if $level == 0 {
@return white;
}
@else if $level == 100 {
@return black;
}
@else {
@return darken(white, $level * 1%);;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment