0
|
1 // Gradients
|
|
2
|
|
3 // Horizontal gradient, from left to right
|
|
4 //
|
|
5 // Creates two color stops, start and end, by specifying a color and position for each color stop.
|
|
6 @mixin gradient-x($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
|
7 background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
|
|
8 background-repeat: repeat-x;
|
|
9 }
|
|
10
|
|
11 // Vertical gradient, from top to bottom
|
|
12 //
|
|
13 // Creates two color stops, start and end, by specifying a color and position for each color stop.
|
|
14 @mixin gradient-y($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
|
15 background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
|
|
16 background-repeat: repeat-x;
|
|
17 }
|
|
18
|
|
19 @mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
|
|
20 background-image: linear-gradient($deg, $start-color, $end-color);
|
|
21 background-repeat: repeat-x;
|
|
22 }
|
|
23 @mixin gradient-x-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
|
24 background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
|
25 background-repeat: no-repeat;
|
|
26 }
|
|
27 @mixin gradient-y-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
|
28 background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
|
29 background-repeat: no-repeat;
|
|
30 }
|
|
31 @mixin gradient-radial($inner-color: #555, $outer-color: #333) {
|
|
32 background-image: radial-gradient(circle, $inner-color, $outer-color);
|
|
33 background-repeat: no-repeat;
|
|
34 }
|
|
35 @mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
|
|
36 background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
|
37 }
|