Skip to content

Instantly share code, notes, and snippets.

@linlymatsumura
Created April 23, 2018 16:00
Show Gist options
  • Save linlymatsumura/fad63da97e9ba5a2549c7296cba06a0c to your computer and use it in GitHub Desktop.
Save linlymatsumura/fad63da97e9ba5a2549c7296cba06a0c to your computer and use it in GitHub Desktop.
this is smooth gradient mixin for sass.
@mixin smooth-gradient($direction, $from, $to) {
background-color: $to;
background-image: linear-gradient($direction,
rgba($from, 1) 0%,
rgba($from, 0.738) 19%,
rgba($from, 0.541) 34%,
rgba($from, 0.382) 47%,
rgba($from, 0.278) 56.5%,
rgba($from, 0.194) 65%,
rgba($from, 0.126) 73%,
rgba($from, 0.075) 80.2%,
rgba($from, 0.042) 86.1%,
rgba($from, 0.021) 91%,
rgba($from, 0.008) 95.2%,
rgba($from, 0.002) 98.2%,
rgba($from, 0) 100%
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment