Skip to content

Instantly share code, notes, and snippets.

@vol4ok
Created July 31, 2013 10:31
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 vol4ok/6120992 to your computer and use it in GitHub Desktop.
Save vol4ok/6120992 to your computer and use it in GitHub Desktop.
linear-gradient mixin for scss
@mixin linear-gradient($from, $to) {
background: $from;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, $from), color-stop(1, $to));
background: -webkit-linear-gradient(top, $from, $to);
background: -moz-linear-gradient(top, $from, $to);
background: -ms-linear-gradient(top, $from, $to);
background: -o-linear-gradient(top, $from, $to);
background: linear-gradient(top, bottom, $from, $to);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}');
-ms-filter: quote(progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment