Skip to content

Instantly share code, notes, and snippets.

@grtner
Created January 3, 2012 08:06
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 grtner/1554018 to your computer and use it in GitHub Desktop.
Save grtner/1554018 to your computer and use it in GitHub Desktop.
CSS3 Gradient SCSS Mixin
@mixin linear-gradient($firstColor, $secondColor) {
background-color: $secondColor; /* Fallback Color */
background-image: -webkit-gradient(linear, left top, left bottom, from($firstColor), to($secondColor)); /* Saf4+, Chrome */
background-image: -webkit-linear-gradient(top, $firstColor, $secondColor); /* Chrome 10+, Saf5.1+, iOS 5+ */
background-image: -moz-linear-gradient(top, $firstColor, $secondColor); /* FF3.6 */
background-image: -ms-linear-gradient(top, $firstColor, $secondColor); /* IE10 */
background-image: -o-linear-gradient(top, $firstColor, $secondColor); /* Opera 11.10+ */
background-image: linear-gradient(top, $firstColor, $secondColor);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment