Skip to content

Instantly share code, notes, and snippets.

@starzonmyarmz
Created June 7, 2012 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save starzonmyarmz/2888786 to your computer and use it in GitHub Desktop.
Save starzonmyarmz/2888786 to your computer and use it in GitHub Desktop.
//Prefixes definition
$webkit:true;
$o:true;
$moz:true;
$w3:true;
$ms:true;
//Gradient Mixin
@mixin gradient($mode,$direction,$from,$to,$oldDirection:null){
@if $webkit == true {
@if($oldDirection != null){
background-image: -webkit-gradient($mode, #{$oldDirection}, from($from),to($to));
}
background-image: -webkit-#{$mode}-gradient($direction, $from, $to);
}
@if $moz == true {
background-image: -moz-#{$mode}-gradient($direction, $from, $to);
}
@if $o == true {
background-image: -o-#{$mode}-gradient($direction, $from, $to);
}
@if $ms == true {
background-image: -ms-#{$mode}-gradient($direction, $from, $to);
}
@if $w3 == true {
background-image: #{$mode}-gradient($direction, $from, $to);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment