Skip to content

Instantly share code, notes, and snippets.

@uhtred
Created July 23, 2014 21:49
Show Gist options
  • Save uhtred/170929ac9872b3fbe333 to your computer and use it in GitHub Desktop.
Save uhtred/170929ac9872b3fbe333 to your computer and use it in GitHub Desktop.
SASS: Mixin Linear Gradient
@mixin linear-gradient( $start: #f1f1f1, $from: 0%, $stop: #d9d9d9, $to: 100% ) {
background: $start;
background: -webkit-gradient(linear, left top, left bottom, from(ie-hex-str($start)), to(ie-hex-str($stop)));
background: -moz-linear-gradient(center top, $start $from, $stop $to);
background: -moz-gradient(center top, $start $from, $stop $to);
background: -webkit-linear-gradient(top, $start $from,$stop $to);
background: -o-linear-gradient(top, $start $from,$stop $to);
background: -ms-linear-gradient(top, $start $from,$stop $to);
background: linear-gradient(to bottom, $start $from,$stop $to);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{ie-hex-str($start)}', endColorstr='#{ie-hex-str($stop)}',GradientType=0 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment