Created
July 20, 2010 22:30
-
-
Save kriswallsmith/483701 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@mixin gradient($start, $end, $type: "vertical") { | |
@if "vertical" == $type { | |
background: -webkit-gradient(linear, left top, left bottom, from($start), to($end)); | |
background: -moz-linear-gradient(top, $start, $end); | |
filter: progid:DXImageTransform.Microsoft.gradient(StartColorStr='#{$start}', EndColorStr='#{$end}'); | |
} @else if "horizontal" == $type { | |
background: -webkit-gradient(linear, left top, right top, from($start), to($end)); | |
background: -moz-linear-gradient(left, $start, $end); | |
filter: progid:DXImageTransform.Microsoft.gradient(StartColorStr='#{$start}', EndColorStr='#{$end}', GradientType=1); | |
} @else { | |
@warn "#{$type} is not a valid gradient type"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment