Skip to content

Instantly share code, notes, and snippets.

@jonbellah
Created June 30, 2013 17:31
Show Gist options
  • Save jonbellah/5896071 to your computer and use it in GitHub Desktop.
Save jonbellah/5896071 to your computer and use it in GitHub Desktop.
Sass Gradients Mixin
@mixin gradient($from, $to) {
background: $from;
background: -moz-linear-gradient(top, $to 0%, $from 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$to), color-stop(100%,$from));
background: -webkit-linear-gradient(top, $to 0%, $from 100%);
background: -o-linear-gradient(top, $to 0%, $from 100%);
background: -ms-linear-gradient(top, $to 0%, $from 100%);
background: linear-gradient(to bottom, $to 0%, $from 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$to', endColorstr='$from',GradientType=0 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment