Created
July 23, 2014 21:49
-
-
Save uhtred/170929ac9872b3fbe333 to your computer and use it in GitHub Desktop.
SASS: Mixin Linear Gradient
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
@mixin linear-gradient( $start: #f1f1f1, $from: 0%, $stop: #d9d9d9, $to: 100% ) { | |
background: $start; | |
background: -webkit-gradient(linear, left top, left bottom, from(ie-hex-str($start)), to(ie-hex-str($stop))); | |
background: -moz-linear-gradient(center top, $start $from, $stop $to); | |
background: -moz-gradient(center top, $start $from, $stop $to); | |
background: -webkit-linear-gradient(top, $start $from,$stop $to); | |
background: -o-linear-gradient(top, $start $from,$stop $to); | |
background: -ms-linear-gradient(top, $start $from,$stop $to); | |
background: linear-gradient(to bottom, $start $from,$stop $to); | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{ie-hex-str($start)}', endColorstr='#{ie-hex-str($stop)}',GradientType=0 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment