Skip to content

Instantly share code, notes, and snippets.

@burnto
Created February 25, 2011 07:01
Show Gist options
  • Save burnto/843456 to your computer and use it in GitHub Desktop.
Save burnto/843456 to your computer and use it in GitHub Desktop.
Gradient scss mixin
// Vertical gradient scss mixin
@mixin gradient($start-color: #f3f3f3, $end-color: #fcfcfc) {
background: $start-color; /* for non-css3 browsers */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start-color}', endColorstr='#{$end-color}'); /* ie */
background: -webkit-gradient(linear, left top, left bottom, from($start-color), to($end-color)); /* webkit */
background: -moz-linear-gradient(top, $start-color, $end-color); /* ff */
}
// --- Usage ---
section.info {
@include gradient;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment