Utilities » Mixins A mixin for linear gradients. Allows multiple color stops.Link
New IssueSource: https://www.sitepoint.com/building-linear-gradient-mixin-sass
Examples
.selector-1 {
@include linear-gradient(#31B7D7, #EDAC7D);
}
.selector-2 {
@include linear-gradient(to right, #E47D7D 0%, #C195D3 50%, #4FB4E8 100%);
}
.selector-3 {
@include linear-gradient(42deg, #B58234 0%, #D2B545 50%, #D7C04D 50.01%, #FFFFFF 100%);
}
Parameters:
-
@param {Keyword | Angle} $direction
Linear gradient direction -
@param {Arglist} $color-stops
List of color-stops composing the gradient
_mixins.scss, line 173
View Source