public
Created

CSS3 Gradient SCSS Mixin

  • Download Gist
gradientMixin.scss
SCSS
1 2 3 4 5 6 7 8 9
@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);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.