-
-
Save rxbynerd/1349727 to your computer and use it in GitHub Desktop.
SCSS mixing for CSS3 gradients
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 gradient($from, $to) { | |
/* fallback/image non-cover color */ | |
background-color: $from; | |
/* Firefox 3.6+ */ | |
background-image: -moz-linear-gradient($from, $to); | |
/* Safari 4+, Chrome 1+ */ | |
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to)); | |
/* Safari 5.1+, Chrome 10+ */ | |
background-image: -webkit-linear-gradient($from, $to); | |
/* Opera 11.10+ */ | |
background-image: -o-linear-gradient($from, $to); | |
} |
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
.my_div { | |
@include gradient($background_color, white); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment