Debian Codegraph @

debian/missing-sources/bourbon/app/assets/stylesheets/css3/_background-image.scss

raw
1 //************************************************************************//
2 // Background-image property for adding multiple background images with
3 // gradients, or for stringing multiple gradients together.
4 //************************************************************************//
5
6 @mixin background-image($images...) {
7 @include _bourbon-deprecate-for-prefixing("background-image");
8
9 $webkit-images: ();
10 $spec-images: ();
11
12 @each $image in $images {
13 $webkit-image: ();
14 $spec-image: ();
15
16 @if (type-of($image) == string) {
17 $url-str: str-slice($image, 1, 3);
18 $gradient-type: str-slice($image, 1, 6);
19
20 @if $url-str == "url" {
21 $webkit-image: $image;
22 $spec-image: $image;
23 }
24
25 @else if $gradient-type == "linear" {
26 $gradients: _linear-gradient-parser($image);
27 $webkit-image: map-get($gradients, webkit-image);
28 $spec-image: map-get($gradients, spec-image);
29 }
30
31 @else if $gradient-type == "radial" {
32 $gradients: _radial-gradient-parser($image);
33 $webkit-image: map-get($gradients, webkit-image);
34 $spec-image: map-get($gradients, spec-image);
35 }
36 }
37
38 $webkit-images: append($webkit-images, $webkit-image, comma);
39 $spec-images: append($spec-images, $spec-image, comma);
40 }
41
42 background-image: $webkit-images;
43 background-image: $spec-images;
44 }