Skip to content
Create a gist now

Instantly share code, notes, and snippets.

How I'd implement in Sass
@function color-shift($color, $amount: 10%) {
@return if(lightness($color) > 50%,
darken($color, $amount),
lighten($color, $amount))
$my-bg-color: #333;
$my-fg-color: #c00;
.shifted {
background-color: color-shift($my-bg-color);
color: color-shift($my-fg-color);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.