Created
February 25, 2011 07:01
-
-
Save burnto/843456 to your computer and use it in GitHub Desktop.
Gradient scss mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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