Skip to content

Instantly share code, notes, and snippets.

@KyleGobel
Created October 16, 2013 19:37
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 KyleGobel/7013502 to your computer and use it in GitHub Desktop.
Save KyleGobel/7013502 to your computer and use it in GitHub Desktop.
Gradient SASS Mixin
@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);
/*if they ever depricate the older shit*/
background-image: linear-gradient($from, $to);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment