Skip to content

Instantly share code, notes, and snippets.

@bloodyowl
Created July 23, 2012 19:07
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 bloodyowl/3165483 to your computer and use it in GitHub Desktop.
Save bloodyowl/3165483 to your computer and use it in GitHub Desktop.
Stylus gradients
// middle between two colors
middle(first, second)
rgb((red(first) + red(second)) / 2, (green(first) + green(second)) / 2, (blue(first) + blue(second)) / 2)
// simple gradients
linear-gradient(start, end)
// fallback using the intermediate color
background: middle(start, end)
// gradients
background: -moz-linear-gradient(top, start 0%, end 100%)
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, start), color-stop(100%,end))
background: -webkit-linear-gradient(top, start 0%,end 100%)
background: -o-linear-gradient(top, start 0%, end 100%)
background: -ms-linear-gradient(top, start 0%, end 100%)
background: linear-gradient(top, start 0%, end 100%)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment