Skip to content

Instantly share code, notes, and snippets.

@saki007ster
Created September 3, 2013 05:26
Show Gist options
  • Save saki007ster/6419997 to your computer and use it in GitHub Desktop.
Save saki007ster/6419997 to your computer and use it in GitHub Desktop.
vertical gradient
@mixin gradient($startColor:$white, $endColor:$gray-2) {
background:$startColor; // fallback
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}',GradientType=0 ); // IE 6-8
background:-ms-linear-gradient(top, $startColor 0%, $endColor 100%); // IE 10+
background:-o-linear-gradient(top, $startColor 0%, $endColor 100%); // Opera
background:-moz-linear-gradient(top, $startColor 0%, $endColor 100%); // Firefox
background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, $startColor), color-stop(100%, $endColor)); // Webkit (Safari, Chrome, other)
background:-webkit-linear-gradient(top, $startColor 0%, $endColor 100%); // Webkit (Safari, Chrome, other)
background:linear-gradient(to bottom, $startColor 0%, $endColor 100%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment