Skip to content

Instantly share code, notes, and snippets.

@joshuatuscan
Created March 11, 2013 20:52
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 joshuatuscan/5137644 to your computer and use it in GitHub Desktop.
Save joshuatuscan/5137644 to your computer and use it in GitHub Desktop.
Mixin for css background gradient
@mixin bg-gradient-linear($bottom-color, $top-color) {
background-color: $bottom-color;
background-image: -ms-linear-gradient(bottom, $bottom-color 0%, $top-color 100%);
background-image: -moz-linear-gradient(bottom, $bottom-color 0%, $top-color 100%);
background-image: -o-linear-gradient(bottom, $bottom-color 0%, $top-color 100%);
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, $bottom-color), color-stop(1, $top-color));
background-image: -webkit-linear-gradient(bottom, $bottom-color 0%, $top-color 100%);
background-image: linear-gradient(to top, $bottom-color 0%, $top-color 100%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment